Skip to content

Instantly share code, notes, and snippets.

@lsmith
Created June 28, 2010 21:57
Show Gist options
  • Select an option

  • Save lsmith/456417 to your computer and use it in GitHub Desktop.

Select an option

Save lsmith/456417 to your computer and use it in GitHub Desktop.
var anim = new Y.Anim({
node: '#foo',
to: {
height: function (node) {
return Math.round(node.get('offsetHeight') / 2);
}
}
});
anim.run(); // animate from say 200px to 100px. Call again to animate to 50px and so on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment