kc-hasclass
v1.0.6
Published
[browser] Check if DOM element has a class.
Downloads
3
Readme
Element has class
[browser] Check if DOM element has a class.
Install
npm install kc-hasclass
Use
var el = document.querySelector('#my-elem');
var cls = 'dummy'; // Class name
var has = hasclass(el, cls);
console.log(has);