How do I get my accordion to load with all the menus closed?

Hoa picture Hoa · Feb 23, 2012 · Viewed 144.2k times · Source

I'm trying to follow the example here

http://twitter.github.com/bootstrap/javascript.html#collapse

I have placed a mockup here

http://jsfiddle.net/gqe7g/

Loading behavior is strange. It shows Menu1 then collapses it then shows Menu2 and Menu3. I would like everything to open collapsed. I have tried the following without success

$('#accordion').collapse({hide: true})

Answer

Vinay Sahni picture Vinay Sahni · May 24, 2012

From the doc:

If you'd like it to default open, add the additional class in.

In other words, leave out the "in" and it will default to close. http://jsfiddle.net/JBRh7/