Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个超过 15 页的 JQuery 动画点击。客户端希望它自动启动,如果保持不变,动画将一直播放。有没有办法按步骤或分段来做,比如播放这个部分,完成后播放下一个部分,依此类推,直到最后?
您可以简单地使用回调:
$("something").animate({stuff}, duration, function(){ // CALL NEXT STEP HERE, THIS EXECUTES WHEN ANIMATION COMPLETES });
http://api.jquery.com/animate/