Bootstrap collapse not firing on first click in IE

javascript, jquery, twitter-bootstrap

Solution

Found this SO question:

Bootstrap 2.1.1 "Collapsible" not opening first time in IE

"This problem is not related to IE : this will happen on any browser that doesn't support transitions (or if it is deactivated).

That's because you need to initialize the plugin first. If you don't, it both initializes and toggles the collapse on the first click : the default initialization toggles the collapse (doc), and without the transitions, the collapse is toggled twice in a row without being seen."

Problem

I'm using bootstrap collapse without the accordion markup. This function is working fine in FF, Chrome etc. In ie7, 8 & 9 it works, but only the second time I click on 'trigger'. ``` $('.trigger').click(function(e){ e.preventDefault(); $(this).closest('.item').find('.item-dropdown').collapse('toggle'); }); ``` Any ideas why?

Original source

Related problems