1.0.1 • Published 4 years ago

element-hasclass v1.0.1

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

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>