JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 51389
  • Score
    100M100P100Q132853F
  • License ISC

add and remove classes from dom elements

Package Exports

  • element-class

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (element-class) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

element-class

like .addClass, .removeClass 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')

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

license

BSD