¡@

Home 

2014/10/16 ¤W¤È 12:03:35

jquery Programming Glossary: functionone

Wait till a Function is finished until running another Function

http://stackoverflow.com/questions/12116505/wait-till-a-function-is-finished-until-running-another-function

animations etc that collide. I can't simply put one in the callback function of another multiple dom animations etc FunctionOne What I was doing to wait till running the next function filled with animations etc setTimeout function FunctionTwo other.. other dom animations some triggering on previous ones 1000 Is there anyway in js jQuery to have Pseudo code do FunctionOne when finished run FunctionTwo I know about .when .done but those are for AJAX... MY UPDATED SOLUTION jQuery has an exposed.. animations are done javascript jquery callback share improve this question You can use jQuery's .Deferred var FunctionOne function create a deferred object var r .Deferred do whatever you want e.g. ajax animations other asyc tasks setTimeout..