admin管理员组文章数量:1317898
The following jquery script is not working in firefox. Anyone with a idea on how to correct it?
$(document).ready(function () {
$('#all_lists').hide();
$('#add_lists').click( function(){
event.stopPropagation();
$('#all_lists').toggle();
});
$(document).click( function(){
$('#all_lists').hide();
});
});
The following jquery script is not working in firefox. Anyone with a idea on how to correct it?
$(document).ready(function () {
$('#all_lists').hide();
$('#add_lists').click( function(){
event.stopPropagation();
$('#all_lists').toggle();
});
$(document).click( function(){
$('#all_lists').hide();
});
});
Share
Improve this question
asked Oct 13, 2013 at 14:37
acaciaacacia
1,3871 gold badge14 silver badges41 bronze badges
2
-
1
You need to pass
event
in the click function like$('#add_lists').click( function(event){
– Sergio Commented Oct 13, 2013 at 14:37 -
In your
#add_lists
click-handler, addevent
argument to the function. – Guillaume Poussel Commented Oct 13, 2013 at 14:38
2 Answers
Reset to default 8You need to pass event
as an argument in the click function like:
$('#add_lists').click( function(event){
^ ^
javascript:jQuery('body').toggleClass('open');
Using JS on an image map was returning [object, Object] in a new window in Firefox only. Fixed with:
javascript:jQuery('body').toggleClass('open');void(0);
本文标签: javascriptJquery toggle not working in FirefoxStack Overflow
版权声明:本文标题:javascript - Jquery toggle not working in Firefox - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742031089a2416455.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论