1.0.6 • Published 3 years ago
kc-hasclass v1.0.6
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);