A light weight way to add or remove classes on a HTML element
import ElementClasses from './elementClasses'
// get an instance
let elem = new ElementClasses(element)
Add class for this element if this element does not has this className
Remove class from this element if this element has this className
If this className does not exit, add this className, otherwise remove this className
Check this className exits or not
- Chain
elem.addClass("hidden").addClass("disappear")...