hasClassName :: Element

hasClassName(element, className) -> Boolean

 

Checks whether element has the given CSS className.

 

Examples

 

<div id="mutsu" class="apple fruit food"></div>

 

$('mutsu').hasClassName('fruit');

// -> true

 

$('mutsu').hasClassName('vegetable');

// -> false

 


Prototype API 1.5.0 - prototypejs.org