I basically have this code:
for (var i = 0; i < num; i++) {
ShowCard(i);
}
Right now, ShowCard is just adding a DOM element, but I want it to have an animation that'll show this card flying from somewhere else (the shoe) into its final destination, and I want the second card to wait until the first one is done flying before it starts.
Is there any way to achieve this, without rewriting my whole code in "continuation passing" style?
I'm assuming the answer is no and i'll have to bit the bullet and do it, but thought i'd ask.
Thanks!
Daniel
The answer is no.
The only blocking APIs in JavaScript are the built in ones -
alert
,confirm
andprompt
.