Skip to content

kaisarsnippets/js-hasclass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

[browser] Check if DOM element has a class.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published