Was banging my head on the wall for hours trying to figure out a bug in Bootstrap’s accordion component. I followed the example code in the Bootstrap doc, but for some reason, the accordion would only toggle once. So if it was initially open, then I could collapse it, but clicking on it again, wouldn’t open it. If the accordion was initially closed, I could open it (once), but then clicking on it again wouldn’t close it. Turns out this was the issue: http://stackoverflow.com/questions/17202285/bootstrap-collapse-only-toggles-once The solution suggests that there’s a conflict with an old prototypeJS library. However, I checked out all the js files attached to the project and didn’t see any explicit linking to prototypeJS, so I’m not sure where the conflict is occurring. Nevertheless, if this affects you, follow the instructions at the stackoverflow’s link and modify that one line from

this.$element.trigger(startEvent)

to

this.$element.triggerHandler(startEvent)

 
If it still doesn’t work for you after making this change, then make sure to empty your browser cache and then test it again.

Leave a Comment

Your email address will not be published. Required fields are marked *