How do I chain or queue custom functions using JQuery?

前端 未结 15 1471
暗喜
暗喜 2020-12-04 19:49

I have multiple functions the do different animations to different parts of the HTML. I would like to chain or queue these functions so they will run the animations sequenti

15条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 20:22

    As far as animation interval already defined in 2000 ms, you can do second call with delay in 2000 ms:

    One();
    SetTimeout(function(){
      Two();
    }, 2000);
    

提交回复
热议问题