我在悬停时遇到问题。 当单击其中的子项时,整个菜单会淡出,然后再淡出。
$('.sc_menuwrap').hover(function(){
$('.sc_menuwrap').stop().fadeTo("slow", 1.0); // This sets the opacity to 100% on hover
},function(){
$('.sc_menuwrap').stop().fadeTo("slow", 0); // This sets the opacity back to 60% on mouseout
});
您可以在此处查看工作示例:http://dluxstudios.com/11 非常感谢任何帮助。
最佳答案
$('.sc_menuwrap').hover(function(){
$(this).stop().fadeTo("slow", 1.0);
},function(){
$(this).stop().fadeTo("slow", 0);
});
试试这个,一定有用。
关于Jquery .hover 函数淡入淡出问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7438131/