【发布时间】:2012-08-26 17:16:52
【问题描述】:
例如请看这些代码:
HTML:
<div id="hvr">hover me</div>
<div id="box" style="background:#ddd; width:100px; height:50px;"></div>
jQuery:
$(function(){
$("#hvr").hover(function(){
$("#box").animate({width:'150px'},500);
more animations/functions here ...
}, function(){
$("#box").animate({width:'100px'},500);
more animations/functions here ...
});
当我快速将鼠标悬停在文本上 3 次时,框会在每个完成后动画 3 次。 如何设置悬停超时,这将禁用悬停效果,直到第一个动画/功能[由于第一次悬停]完成?
【问题讨论】: