Skip to content

Instantly share code, notes, and snippets.

@cheeaun
Created August 17, 2009 02:38
Show Gist options
  • Save cheeaun/168852 to your computer and use it in GitHub Desktop.
Save cheeaun/168852 to your computer and use it in GitHub Desktop.
MooTools Element.unsetStyle and unsetStyles (idea from @keeto)
Element.implement({
unsetStyle: function(property){
if (property == 'float') property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat';
property = property.camelCase();
delete this.style[property];
return this;
},
unsetStyles: function(properties){
properties.each(function(property){
this.unsetStyle(property);
}, this);
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment