admin管理员组文章数量:1400007
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?
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?
Share Improve this question asked Mar 21, 2013 at 3:15 Nicole HarrisNicole Harris 8601 gold badge13 silver badges27 bronze badges 01 Answer
Reset to default 7Found 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."
本文标签: javascriptBootstrap collapse not firing on first click in IEStack Overflow
版权声明:本文标题:javascript - Bootstrap collapse not firing on first click in IE - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744640554a2617092.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论