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