Jquery 切换在 Firefox 中不起作用 [英] Jquery toggle not working in Firefox
本文介绍了Jquery 切换在 Firefox 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下 jquery 脚本在 Firefox 中不起作用.任何人都知道如何纠正它?
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();
});
});
推荐答案
您需要将 event
作为参数传递给 click 函数,例如:
You need to pass event
as an argument in the click function like:
$('#add_lists').click( function(event){
^ ^
这篇关于Jquery 切换在 Firefox 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文