classname-utils
v3.0.0
Published
addClass removeClass hasClass
Downloads
5
Readme
import { hasClass, addClass, removeClass } from 'classname-utils'
var ele = document.getElementById('myEle')
hasClass(ele, 'my-class') // return Boolean
addClass(ele, 'my-class') // add 'my-class' to ele
removeClass(ele, 'my-class') // remove 'my-class' from ele