$("sth").not(':animated').animate();
哎
这是确定它在同一时刻没有动画的动画元素的最佳方法吗?
谢谢
答案 0 :(得分:3)
取决于你想要的,是的。虽然我很好奇sth
选择器是什么:)
$("#id:not(:animated)").animate(); // Is another way to write it
或者,如果您只想在再次设置动画之前停止播放,请使用stop()
:
$("#id").stop().animate();