$("#IMAGE1").animate({"left": "+=1050px", queue: false}, "slow", function()
{
// Want this to happen when the image2 animation is completed as well.
$("#IMAGE1").css('left', $('#IMAGE2').position().left);
}
$("#IMAGE2").animate({"left": "+=1050px", queue: false}, "slow");
如何在image1.animation的回调函数体内完成image2.animation的检查?
答案 0 :(得分:4)
您可以使用:animated
选择器:
if ($('#IMAGE1').is(':animated')) {
// it's animating...
}
参考文献: