Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
水平Jquery菜单-尝试停止动画队列_Jquery_Css_Menu_Jquery Animate_Submenu - Fatal编程技术网

水平Jquery菜单-尝试停止动画队列

水平Jquery菜单-尝试停止动画队列,jquery,css,menu,jquery-animate,submenu,Jquery,Css,Menu,Jquery Animate,Submenu,你好,我正在制作水平菜单。子菜单也是水平的。 悬停时子菜单应淡入,鼠标悬停时子菜单应淡出 我的问题是,Jquery使这些animationsqueue成为一种东西,这会杀死我的菜单。如果你看一下,你可能会明白我的意思。你想停止哪个元素?改用这个: $("#nav li").hover(function () { $(this).children("ul").stop(true, true).fadeIn("slow"); }, function(){ $(this

你好,我正在制作水平菜单。子菜单也是水平的。 悬停时子菜单应淡入,鼠标悬停时子菜单应淡出


我的问题是,Jquery使这些animationsqueue成为一种东西,这会杀死我的菜单。如果你看一下,你可能会明白我的意思。

你想停止哪个元素?改用这个:

$("#nav li").hover(function () {
    $(this).children("ul").stop(true, true).fadeIn("slow");
    },
    function(){
    $(this).children("ul").stop(true, true).fadeOut("slow");
});

使用stopPropagation似乎有效,但我不确定您是否想要:
悬停(函数(e){$(this).children(“ul”).fadeIn(“slow”);e.stopPropagation();
经过测试,对我不起作用。同样的问题。但无论如何,thx!啊,好多了!!但你也知道如何防止这种重叠。如果你从左到右快速悬停在所有链接上?或者可能有人现在看到了我想做的事的教程或示例菜单。@user1494353通过减少淡出毫秒,例如
。淡出(1);
@user1494353我认为
.fadeOut(100)
非常适合你。