Created
August 17, 2009 02:38
-
-
Save cheeaun/168852 to your computer and use it in GitHub Desktop.
MooTools Element.unsetStyle and unsetStyles (idea from @keeto)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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