我写了这个脚本:
$("#comments .comment .links").hide();
$("#comments .comment").hover(
function() { $(".links", this).stop(true).slideDown(300); },
function() { $(".links", this).stop(true).slideUp(300); }
);现在我有个问题了。当我将鼠标悬停在评论div上时。我在上面徘徊了几次。该.links div不再显示。div未完全打开。
我怎么才能修复它呢?
发布于 2012-05-09 19:23:15
尝尝这个
$("#comments .comment .links").hide();
$("#comments .comment").hover(
function() { $(".links", this).not(":animated").slideDown(300); },
function() { $(".links", this).not(":animated").slideUp(300); }
);或
$("#comments .comment .links").hide();
$("#comments .comment").hover(
function() {
$(".links", this).stop(true, true).slideToggle();
}
);发布于 2012-05-09 20:32:37
稍微修改一下,你就会得到这样的结果。
$("#comments .comment .links").hide();
$("#comments .comment").hover(
function() { $(".links", this).stop(true, true).slideDown(300); },
function() { $(".links", this).stop(true, true).slideUp(300); }
);https://stackoverflow.com/questions/10514833
复制相似问题