element-hasclass
v1.0.1
Published
Tiny zero dependency helper module to check if element(s) have a particular class
Downloads
7
Maintainers
Readme
element-hasclass
Tiny zero dependency helper module to check if element(s) have a particular class
This emulates jQuery's hasClass
behaviour: it works for multiple elements, and even works in awful browsers.
hasClass(elements, 'class-to-check');
Installation and usage
Grab from NPM
npm install element-hasclass
And import it
import hasClass from 'element-hasclass';
Or grab the minified JavaScript from unpkg
<script src="https://unpkg.com/element-hasclass"></script>