How do I chain or queue custom functions using JQuery?

前端 未结 15 1472
暗喜
暗喜 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:37

    A safer and 100% working way is to use a variable and if-branches. In the example below we do 4 jobs which take 1 second, after the job we want the function f2 to run.

    
    

提交回复
热议问题