Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

element-class

0.2.2 • Public • Published

element-class

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

testling badge

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')
 
// toggle a class
elementClass(foo).toggle('foo')
 
// check if element has a class
elementClass(foo).has('foo')

license

BSD

Keywords

none

install

npm i element-class

Downloadsweekly downloads

60,283

version

0.2.2

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability