您可以指定一个回调函数:$(selector).fadeOut('slow', function() { // will be called when the element finishes fading out // if selector matches multiple elements it will be called once for each});
在jQuery 1.6版本中,您可以使用.promise()方法。$(selector).fadeOut('slow');$(selector).promise().done(function(){ // will be called when all the animations on the queue finish});