Created
October 14, 2012 19:53
-
-
Save parrfolio/3889634 to your computer and use it in GitHub Desktop.
ClassList
This file contains 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
{ | |
length: {number}, /* # of class on this element */ | |
add: function() { [native code] }, | |
contains: function() { [native code] }, | |
item: function() { [native code] }, /* by index */ | |
remove: function() { [native code] }, | |
toggle: function() { [native code] } | |
} | |
Support: http://caniuse.com/classlist | |
Example: myDiv.classList.add('myCssClass'); | |
Info: http://davidwalsh.name/classlist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment