Bootstrap collapse panel keeping a div open after a submit
<p>I have an accordion <strong>div (panel-collapse)</strong>, at the end of the <strong>panel</strong> I have a <strong>submit button</strong>, initially, <code>all the panel div are closed</code>, I want to keep the state of the div the same after the submit reload. </p>

<pre><code>  &lt;div class="panel-group"&gt;
    &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading"&gt;
        &lt;h4 class="panel-title"&gt;
          &lt;a data-toggle="collapse" href="#collapse1"&gt;Collapsible panel&lt;/a&gt;
        &lt;/h4&gt;
      &lt;/div&gt;
      &lt;div id="collapse1" class="panel-collapse collapse"&gt;
        &lt;div class="panel-body"&gt;Panel Body&lt;/div&gt;
        &lt;div class="panel-footer"&gt;Panel Footer&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;

&lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading"&gt;
        &lt;h4 class="panel-title"&gt;
          &lt;a data-toggle="collapse" href="#collapse2"&gt;Collapsible panel&lt;/a&gt;
        &lt;/h4&gt;
      &lt;/div&gt;
      &lt;div id="collapse2" class="panel-collapse collapse"&gt;
        &lt;div class="panel-body"&gt;Panel Body&lt;/div&gt;
        &lt;div class="panel-footer"&gt;Panel Footer&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
</code></pre>