Bootstrap - Toggle sidebar with icons
<p>I have such a layout:</p>

<p><a href="https://i.stack.imgur.com/RsKRJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RsKRJ.png" alt="enter image description here"></a></p>

<p>I would like that when one clicks the orange button, the sidebar shrinks and leaves only the icons visible. And for the mobile should totally shrink and when one clicks the button only the icons should be visible. The behaviour should be like <a href="http://webapplayers.com/inspinia_admin-v2.5/widgets.html#" rel="noreferrer">this</a> but I don't understand how to make it work.</p>

<p>For now I have my header:</p>

<pre><code>&lt;div class="navbar-header"&gt;
  &lt;a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#menu-toggle" onclick="toggle()"&gt;&lt;i class="fa fa-bars"&gt;&lt;/i&gt;&lt;/a&gt;
  &lt;a class="navbar-brand" href="#"&gt;...&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>But I don't know how to make it collapse when one clicks.. Thanks</p>