toggleClassName

toggleClassName(element, className) -> HTMLElement

Toggles element’s CSS className and returns element.

Examples


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

$('mutsu').hasClassName('fruit');
// -> false

$('mutsu').toggleClassName('fruit');
// -> element

$('mutsu').hasClassName('fruit');
// -> true