This repository is a mirror of the component module jkroso/classes. It has been modified to work with NPM+Browserify. You can install it using the command npm install npmcomponent/jkroso-classes
. Please do not open issues or send pull requests against this repo. If you have issues with this repo, report it to npmcomponent.
x-browser class manipulation
$ packin add jkroso/classes
then in your app:
var classes = require('classes')
Add class name
if not already present.
Remove name
if present. If name is a RegExp
it will act like removeMatching()
.
Remove all classes matching re
.
Toggle class name
.
Return an array of classes.
Just run make
and navigate your browser to the test directory.
This is very heavily based off component/classes test suite and all. This is just a port to a function based API rather than a Method based one.