title: Bootstrap stay accordion open page reload
body: <p>How can I make the accordion and sub accordion stay open if a reload the page (clicking one of the items)? Do I have to write an own function to save the items that are open on open them on the page reload or is that a possibility with the built in javascript of bootstrap.</p>
  
  <pre><code>&lt;div id="MainMenu"&gt;
  &lt;div class="list-group"&gt;
      &lt;a href="#menu0" class="list-group-item" data-toggle="collapse" data-parent="#MainMenu"&gt;Holz&lt;/a&gt;
      &lt;div id="menu0" class="collapse"&gt;
          &lt;a href="/products/index/11" class="list-group-subitem"&gt;A&lt;/a&gt;
          &lt;a href="/products/index/12" class="list-group-subitem"&gt;B&lt;/a&gt;
          &lt;a href="/products/index/13" class="list-group-subitem"&gt;C&lt;/a&gt;
          &lt;a href="/products/index/14" class="list-group-subitem"&gt;D&lt;/a&gt;
          &lt;a href="#menu0_1" class="list-group-subitem" data-toggle="collapse" data-parent="#MainMenu"&gt;E&lt;/a&gt;
          &lt;div id="menu0_1" class="collapse"&gt;
              &lt;a href="/products/index/15" class="list-group-subitem"&gt;E1&lt;/a&gt;
              &lt;a href="/products/index/16" class="list-group-subitem"&gt;E2&lt;/a&gt;
          &lt;/div&gt;   
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>