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
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.