当用户将鼠标悬停在文章上时,我试图在博客文章上显示/隐藏覆盖。我有 hoverIntent 工作,因为它应该延迟鼠标悬停的事件,但我希望 mouseout 事件立即发生,就像没有 hoverIntent 一样。据我所知,没有办法为过度事件设置单独的超时值。有谁知道如何将它们分开,或者如何让 hoverIntent 只延迟结束事件?
$( document ).ready( function() {
$(".bg-overlay").hide();
$(".bg-entry").hoverIntent({
over: showSummary,
timeout: 650,
out: hideSummary
});
});
function showSummary(){ $(this).children(".bg-overlay").fadeIn("fast"); }
function hideSummary(){ $(this).children(".bg-overlay").fadeOut("fast"); }
谢谢你的帮助。