diff -r 000000000000 -r 40c8f766c9b8 src/cm/media/js/lib/yui/yui_3.0.0b1/examples/anim/anim-xy.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui_3.0.0b1/examples/anim/anim-xy.html Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,215 @@ + + + + + YUI Library Examples: Animation: Animating XY Position + + + + + + + + + + + + +
+
+
+

+ + YUI 3.x Home - + +

+
+ + +
+ + + +
+
+
+
+

YUI Library Examples: Animation: Animating XY Position

+
+
+ +

Note: This is YUI 3.x. Looking for YUI 2.x?

+ +
+
+
+
+ +

Animation: Animating XY Position

+ +
+

+

This demonstrates how to animate the xy position of an element.

+

Click anywhere to move the element to your click position.

+

+ +
+
+ + + + + + + + + + + +
+
+
+ +

Setting up the HTML

+

First we add some HTML to animate.

+ + +

Creating the Anim Instance

+

Now we create an instance of Y.Anim, passing it a configuration object that includes the node we wish to animate. We will set the to attribute later when then animation runs.

+ + + +

Changing Attributes

+

Next we need a click handler to set the to attribute for the xy behavior and run the animation.

+ +

Running the Animation

+

Finally we add an event handler to run the animation when the document is clicked.

+ + +

Full Script Source

+ + +
+ +
+ +
+
+ + + +
+ +
+

Copyright © 2009 Yahoo! Inc. All rights reserved.

+

Privacy Policy - + Terms of Service - + Copyright Policy - + Job Openings

+
+
+ + + +