Chaining Animations Using onComplete

A common use case for animation involves causing two or more animations to fire sequentially. This is known as chaining. It's easy to chain animations using the YUI Animation Utility's custom events.

In this example, a color animation is set to fire after an animation of position. Click the button below to start the sequence.

Click here to begin the chained animations.
This element will animate position and then color when you click the button.