0.1.1 • Published 10 years ago
@f/has-class v0.1.1
has-class
Check whether or not an element has a class
Installation
$ npm install @f/has-classUsage
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 ifelementhaselement- 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
10 years ago