0
votes

Using Twitter Bootstrap framework, I'm using $('#foo').collapse() to make an FAQ with collapsable answers that are hidden by default, and then visible when you click the question.

The problem is that I get a flash of all the content before the .collapse() is initialized.

I can't hide the content in advance (via display: none), otherwise the collapse function doesn't know the height of the boxes and collapsing/expanding doesn't work.

I think this could be solved if $('#foo').collapse() didn't animate the initial collapse, and just instantly hid the elements. Any idea on how to do that (or other solutions)?

Here's a fiddle to play with: http://jsfiddle.net/DHZNv/44/

Thanks!

1

1 Answers

2
votes

Is this the behavior you want?

http://jsfiddle.net/DHZNv/45/