例如,请查看这些代码:
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 次。如何设置悬停的超时时间,这将禁用悬停效果,直到第一个动画/功能[由于第一次悬停]完成?