Accordion is not destroyed
The following accordion code does not work properly.
<div class="accordion" id="accordion1"> <div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#note1"> Foo </a> </div> <div class="accordion-body collapse" id="note1"> <div class="accordion-inner"> <pre>Foo body</pre> </div> </div> </div> <div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#note2"> Bar </a> </div> <div class="accordion-body collapse" id="note2"> <div class="accordion-inner"> <pre>Bar body</pre> </div> </div> </div> </div> It is displayed and the elements expand correctly, but the elements will not collapse. When I click on an open item, it briefly collapses and then expands again. I saw this behavior when loading versions 2.1.0 and 2.1.1. Also, I am using jQuery 1.7.2 and 1.8.2 and browsing in Chrome 22.
+6
2 answers
The problem ended up by accidentally including all my javascript script files twice. Removing the duplicate fixed everything. I do not know how common this error is, but if anyone else has this problem in the future, then it would be useful to get this answer, and not just delete this question.
+21