However, I suggested that he queue a function as if it was an animation itself, and use that to fire off the animations each run. That is illustrated below.
The snippet is simple —
- The list of animations is fired. These will be queued to be executed.
- Then the anonymous function itself (arguments.callee refers to the function being executed) is re-queued.
- next() progresses the queue.
nextis passed in as an argument.