Skip to content

Instantly share code, notes, and snippets.

@madrobby
Created March 27, 2009 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madrobby/86960 to your computer and use it in GitHub Desktop.
Save madrobby/86960 to your computer and use it in GitHub Desktop.
s2.fx.Opacity = Class.create(s2.fx.Element, {
setup: function() {
var from = this.options.from || 0, to = this.options.to || 1;
this.element.setStyle('opacity:'+from);
this.animate('style', this.element, { style: 'opacity:'+to });
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment