element-class

add and remove classes from dom elements

npm install element-class
2 downloads in the last day
38 downloads in the last week
163 downloads in the last month

element-class

exactly like .addClass, .removeClass and .hasClass from jquery but without dependencies

npm install element-class
var elementClass = require('element-class')

// get an element
var foo = document.querySelector('.foo')

// remove a class
elementClass(foo).remove('foo')

// add a class
elementClass(foo).add('foo')

// check if element has a class
elementClass(foo).has('foo')

license

BSD

npm loves you