[英]Jquery slideDown/slideUp code only works after CTRL+F5?
This problem has bothered me for many hours now, and I hope somebody can help me. 这个问题困扰了我好几个小时,我希望有人能帮助我。
I have the following code, which opens and closes a recursive UL menu. 我有以下代码,用于打开和关闭递归UL菜单。 It works everywhere, except IE9. 除IE9之外,它均可在任何地方使用。 However, it only works when I refresh the page with CTRL+F5. 但是,仅当我使用CTRL + F5刷新页面时,它才有效。 If I don't refresh with CTRL+F5 I get a bunch of errors like the following: 如果我不使用CTRL + F5刷新,则会收到类似以下的错误:
Does anybody know what's going on here? 有人知道这是怎么回事吗?
$('.groups').find('li:has(ul)').find('.uitklapTrigger').click(function(){
var currentLink = $(this);
if (currentLink.parent().find('ul').first().is(":hidden")){
currentLink.children('.plmin').html('-');
currentLink.parent().find('ul').first().slideDown('slow');
} else {
currentLink.parent().find('ul').first().slideUp("slow", function(){
currentLink.children('.plmin').html('+');
});
}
return false;
});
The answer is clear. 答案很明确。 It had to do with some IE9 setting. 它与某些IE9设置有关。 Miraculously the pc's on which I tested both had some strange (acer factory default) browser settings. 我测试过的PC都奇迹般地具有一些奇怪的(acer出厂默认设置)浏览器设置。 I had reset the browser settings and the problem was solved... Thanks everybody. 我已经重置了浏览器设置,问题已解决……谢谢大家。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.