Question

I've got a weird problem. I'm using Twitter Bootstrap 3, JQuery plus JQuery Validate and Hash to build an accordion menu. In my code I have the following line to collapse a panel:

$("#collapseThree").collapse('hide')         

However the panel is being shown not collapsed. Here's my fiddle:

http://jsfiddle.net/H7kJ3/

To replicate the issue enter a title and email address then press the "Next" button. The second panel ('Step 2') is correctly opened however panel three ('Step 3') is also opened for some unexplained reason.

Was it helpful?

Solution

You need to switch off toggling.

$("#collapseOne").collapse({ toggle: false })
$("#collapseTwo").collapse({ toggle: false })
$("#collapseThree").collapse({ toggle: false })

A fork of your code is here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top