【发布时间】:2013-08-06 04:21:25
【问题描述】:
我知道我应该使用 $(selector).stop().animate();某处,但我不确定当你离开时如何停止延迟,并且非常快地打开它,它会继续动画。这是我的代码,如果你能告诉我该放什么,我会设置(记住我是 jquery 的初学者)。
$(document).ready(function(){
var order = $('#order').mouseenter(function(){
$('#animateorder').animate({top: '+=5.5em'}, 'fast')
});
var order2 = $('#order').mouseleave(function(){
$('#animateorder').animate({top: '-=5.5em'}, 'fast')
});
});
$(document).ready(function(){
$('#contact').mouseenter(function(){
$('#animatecontact').animate({top: '+=5.5em'}, 'fast')
});
$('#contact').mouseleave(function(){
$('#animatecontact').animate({top: '-=5.5em'}, 'fast')
});
});
【问题讨论】:
-
你在
$(selector).stop().animate();中对你的代码有什么不明白的地方??? -
除非您在谈论 FIX 金融协议,否则请不要使用“修复”标签。
标签: jquery animated-gif lag