Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top