kc-hasclass

1.0.6 • Public • Published

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);

Readme

Keywords

Package Sidebar

Install

npm i kc-hasclass

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

1.67 kB

Total Files

4

Last publish

Collaborators

  • kaisarcode