anim-xy.mustache revision 77b17de8f98cd3600f3361da39ab57166bd3be1b
<p>Click anywhere on the gray box below and the little orange box will move to the click position.</p>
<p>Now we create an instance of <code>Y.Anim</code>, passing it a configuration object that includes the <code>node</code> we wish to animate. We will set the <code>to</code> attribute later when then animation runs.</p>
var anim = new Y.Anim({
easing: Y.Easing.elasticOut
<p>Next we need a <code>click</code> handler to set the <code>to</code> attribute for the <code>xy</code> behavior and run the animation.</p>
anim.run();
Y.one('document').on('click', onClick);