A leightweight (0.3kB) extension to the Element prototype to allow checking, adding, removing and toggling classes.
The usage is easy. Include the script file and just use the functions (they can be chained). You can also add, remove, toggle or check for multiple classes by just adding a space between them.
var test = documentgetElementById'test';if testhasClass'active'testaddClass'glow';testremoveClass'active glow'toggleClass'golden';
If you encounter an error or have a feature suggestion please open a new issue on GitHub (https://github.com/EarMaster/CSSClass/).