我是 jQuery 新手,我需要一些帮助来完成这个小代码。
<script type="text/javascript">
$(document).ready(function() {
$('.cartoonsmart_right').animate({top: "-50"},500)(stop for few second and play another .animte).animate({top: "-400"},500, function() {$('.head_monkey1').removeClass("none") .animate({left:"120"});});
} );
</script>
最佳答案
描述
您可以使用 jQuery 的 .delay()
方法。
jQuery.delay() Set a timer to delay execution of subsequent items in the queue.
示例
$('.cartoonsmart_right').animate({top: "-50"},500).delay(2000).animate(...)
更多信息
关于jQuery 停止 .animate 几秒钟并播放另一个动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9161181/