2
$(function(){
$("#top-img").hover(function(){
$(this).stop().animate({height:"400px"},{queue:false,duration:700});
},
function() {
$(this).stop().animate({height:"300px"},{queue:false,duration:700});
});
});
这是我使用的代码,它的大部分很简单。当我将鼠标悬停在div #top-img
上时,它会从300px
的高度(在CSS中设置)开始,并将其设置为高度400px
。如何在悬停高度变化时为此添加延迟?
我想稍有延迟,使
- 人们不得不悬停在它的第二个,然后再运行和
- 你必须关闭它移到了第二它可以追溯到 前
300px
。