How can I close the sidebar menu? (Bootstrap)
<p>I have a side-menu on my bootstrap webpage which is open by default.
If the screen is too small there is a button placed behind it to open the menu again.</p>

<p>When a user clicks on a link I would like the menu to close automatically.</p>

<p>The button I already have opens the menu perfectly, but I have no way of closing it?</p>

<pre><code>&lt;div id="wrapper"&gt;
        &lt;div id="sidebar-wrapper"&gt;
            &lt;ul class="sidebar-nav"&gt;
                &lt;li class="sidebar-brand"&gt;&lt;a href="#/"&gt;&lt;img src="/content/img/AAA.png" width="27px" /&gt;Menu&lt;/a&gt;&lt;/li&gt;
                &lt;li data-ng-hide="!authentication.isAuth"&gt;&lt;a href="#/Page2"&gt;Welcome {{authentication.userName}}&lt;/a&gt;&lt;/li&gt;
                &lt;li data-ng-hide="!authentication.isAuth"&gt;&lt;a href="#/Page2"&gt;Page1&lt;/a&gt;&lt;/li&gt;
                &lt;li data-ng-hide="!authentication.isAuth"&gt;&lt;a href="" data-ng-click="logOut()"&gt;Logout&lt;/a&gt;&lt;/li&gt;
                &lt;li data-ng-hide="authentication.isAuth"&gt;&lt;a href="#/login"&gt;&lt;span class="glyphicon glyphicon-user"&gt;&lt;/span&gt; Login&lt;/a&gt;&lt;/li&gt;
                &lt;li data-ng-hide="authentication.isAuth"&gt;&lt;a href="#/signup"&gt;&lt;span class="glyphicon glyphicon-log-in"&gt;&lt;/span&gt; Sign Up&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;a href="#menu-toggle" class="btn btn-default" id="menu-toggle"&gt;
        Menu
    &lt;/a&gt;

    &lt;script&gt;
        $("#menu-toggle").click(function (e) {
            e.preventDefault();
            $("#wrapper").toggleClass("toggled");
        });
    &lt;/script&gt;
</code></pre>