且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何等待一个jQuery的动画完成下一个开始之前?

更新时间:2021-12-29 06:52:58

http://api.jquery.com/animate/一>

有生有一个完整的功能。你应该放置第二个动画第一的功能齐全。

animate has a "complete" function. You should place the 2nd animation in the complete function of the first.

编辑:例如 http://jsfiddle.net/xgJns/

$("#div1").animate({opacity:.1},1000,function(){
    $("#div2").animate({opacity:.1},1000);    
});​