문제

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