title: How does accordion collapse doesn't toggle on button click
body: <p>The images are like this
  1. On page load.<img src="https://i.stack.imgur.com/BIPBI.jpg" alt="On page laod, collapseTwos is active">
  2. When click on collapseTwos button i.e (next) ,the collapseTwos doesn't toggle.<img src="https://i.stack.imgur.com/odfih.jpg" alt="collapseTwos doesn&#39;t toggle"></p>
  
  <p>The live example is here , this works fine on it ,but in asp page it doesn't
  Follow the link </p>
  
  <pre><code>http://www.bootply.com/DcMZxTPDI8#
  </code></pre>
  
  <p>All file are included ,this code i'm working in masterpage child.The CollapseTwos always reamin untoggle on button click.This problem occurs on every page load,then after it works.</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;div class="col-md-12"&gt;
          &lt;div class="panel-group" id="accordion2"&gt;
              &lt;div class="panel panel-default"&gt;
                  &lt;div class="panel-heading"&gt;
                      &lt;h4 class="panel-title"&gt;
                          &lt;!-- &lt;a data-toggle="collapse" data-parent="#accordion2" href="#collapseTwos"&gt;&lt;span class="glyphicon glyphicon-th-list"&gt;
                          &lt;/span&gt; &lt;/a&gt; --&gt;
                          META DATA
                      &lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div id="collapseTwos" class="panel-collapse collapse"&gt;
                      &lt;div class="panel-body"&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div class="row"&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div class="row"&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                          &lt;a id="btn2" data-toggle="collapse" data-parent="#accordion2" href="#collapseThrees"
                                              class="btn btn-block btn-social btn-success"&gt;Next&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;!-- _____________________________________________________________--&gt;
                      &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;!--   &lt;a data-toggle="collapse" data-parent="#accordion2" href="#collapseThrees"&gt;&lt;span class="glyphicon glyphicon-th-list"&gt;
                          &lt;/span&gt; &lt;/a&gt;--&gt;
                          META DATA
                      &lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div id="collapseThrees" class="panel-collapse collapse"&gt;
                      &lt;div class="panel-body"&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div class="row"&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div class="row"&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                          &lt;a id="btn3" data-toggle="collapse" data-parent="#accordion2" href="#collapseFours"
                                              class="btn btn-block btn-social btn-success"&gt;Next&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &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;!-- &lt;a data-toggle="collapse" data-parent="#accordion2" href="#collapseFours"&gt;&lt;span
                              class="glyphicon glyphicon-th-list"&gt;&lt;/span&gt;&lt;/a&gt;--&gt;META DATA
                      &lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div id="collapseFours" class="panel-collapse collapse"&gt;
                      &lt;div class="panel-body"&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div class="row"&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-12"&gt;
                                  &lt;div class="row"&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                      &lt;/div&gt;
                                      &lt;div class="col-md-4"&gt;
                                          &lt;a id="btn4" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwos"
                                              class="btn btn-block btn-social btn-success"&gt;Next&lt;/a&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The Javascript is as follows.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
     $(document).ready(function () {
         $(".btn4").click(function () {
             $("#collapseFours").collapse('toggle');
         });
         $(".btn2").click(function () {
             $("#collapseTwos").collapse('toggle');
         });
         $(".btn3").click(function () {
             $("#collapseThrees").collapse('toggle');
         });
  
     });
  &lt;/script&gt;
  </code></pre>
  
  <p>All js files are included in it</p>