【发布时间】:2011-03-13 22:21:38
【问题描述】:
我用 jQuery 编写了这段代码,以便有一个简单的悬停向下滑动菜单。它可以工作,但有时会非常跳动。当您将鼠标在某个位置或稍快滑过它时,它会跳开/关闭并闪烁……不知道如何补救?
这是我当前的代码:
this.navLi = jQuery('nav ul li').children('ul').css("display","block").hide().end();
this.navLi.hover(function() {
// mouseover
jQuery(this).find('> ul').stop(true, true).slideDown(100);
}, function() {
// mouseout
jQuery(this).find('> ul').stop(true, true).slideUp(100);
});
【问题讨论】: