2
$("#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 何时完成?

4

1 回答 1

4

您可以使用:animated选择器:

if ($('#IMAGE1').is(':animated')) {
    // it's animating...
}

参考:

于 2012-10-23T22:27:31.250 回答