title: Hide Twitter Bootstrap nav collapse on click
body: <p>This is not a submenu dropdown, the category is class li as in the picture:</p>
  <p><img src="https://i.stack.imgur.com/y1by3.jpg" alt="enter image description here" /></p>
  <blockquote>
  <p>By selecting a category from the responsive menu (the template is just
  one page), I want to hide nav collapse automatically when clicking.
  Also stroll to use as navigation, since the template has only one
  page. I seek a solution that does not affect it, here is the HTML code
  of menu:</p>
  </blockquote>
  <pre><code>    &lt;!-- NAVBAR
    ================================================== --&gt;
  &lt;div class=&quot;navbar navbar-fixed-top&quot;&gt;
    &lt;div class=&quot;navbar-inner&quot;&gt;
      &lt;div class=&quot;container&quot;&gt;
        &lt;a class=&quot;btn btn-navbar&quot; data-toggle=&quot;collapse&quot; data-target=&quot;.nav-collapse&quot;&gt;
        &lt;span class=&quot;icon-bar&quot;&gt;&lt;/span&gt;
        &lt;span class=&quot;icon-bar&quot;&gt;&lt;/span&gt;
        &lt;span class=&quot;icon-bar&quot;&gt;&lt;/span&gt;
        &lt;/a&gt;
        &lt;a class=&quot;brand&quot; href=&quot;#&quot;&gt;Carousel Demo&lt;/a&gt;
        &lt;div class=&quot;nav-collapse&quot;&gt;
          &lt;ul class=&quot;nav&quot; &gt;
            &lt;li class=&quot;active&quot;&gt;&lt;a href=&quot;#home&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;#about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;#portfolio&quot;&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;#services&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;#contact&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
            &lt;!-- dropdown --&gt;
          &lt;/ul&gt;
          &lt;!-- /.nav --&gt;
        &lt;/div&gt;
        &lt;!--/.nav-collapse --&gt;
      &lt;/div&gt;
      &lt;!-- /.container --&gt;
    &lt;/div&gt;
    &lt;!-- /.navbar-inner --&gt;
  &lt;/div&gt;
  &lt;!-- /.navbar --&gt;
  </code></pre>