0.1.1 • Published 8 years ago
@f/has-class v0.1.1
has-class
Check whether or not an element has a class
Installation
$ npm install @f/has-class
Usage
var hasClass = require('@f/has-class')
if (hasClass('show', element)) {
removeClass('show', element)
addClass('hide', element)
}
API
hasClass(className, element)
className
- The class you want to see ifelement
haselement
- The element you want to check forclassName
Returns: A Boolean value indicating whether or not element
has className
in its class list.
License
MIT
0.1.1
8 years ago