質問

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.

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top