开发者

jquery, how to animate element after being sure that it's not being animated at the same time

$("sth").not(':anim开发者_运维知识库ated').animate();

hey

is this the best way to animate element after being sure that it's not being animated at the same moment ?

thanks


Depending on what you want, yes. Though I am curious what the sth selector is :)

$("#id:not(:animated)").animate(); // Is another way to write it

Or if you simply want to stop it before it animates again, use stop():

$("#id").stop().animate();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜