1
我已经创建了一个脚本。这在导航中打开我的子菜单。当你将鼠标移出子菜单时。子菜单必须关闭,延迟300毫秒。但延迟不起作用。我怎样才能解决这个问题?这是我的脚本:延迟子菜单
$('.nav-main .container li').hover(function() {
if ($(this).find('.submenu').length > 0) {
$(this).addClass("hover");
$(this).find('.submenu').show();
}
}, function() {
$(this).find('.submenu').delay(300).hide();
$(this).removeClass("hover");
});
[hoverIntent](http://cherne.net/brian/resources/jquery.hoverIntent.html)。 – wroniasty 2012-04-28 12:49:17