0
这是我迄今所管理,但似乎没有人能帮助我的最后几个功能:如何在循环动画暂停时进行滚动?
<script type='text/javascript''>
$(document).ready(function() {
swing();
});
function swing() { //making the div swing
$('#share').animate({right: '210px'}, 1000, function(){swingback()});
}
function swingback() { //making the div swing back
$('#share').animate({right: '220px'}, 1000, function(){swing()});
}
$('#share').mouseenter(function() { // stop any animation if the mouse enters the div
$(this).stop();
}).mouseleave(function() { // continue animation once the mouse has left the div
swingBack();
});
</script>
那么它现在做了什么?它不能停止,还是重新开始? – 2010-11-16 04:21:04