dojo - dojo tutorial dom-class in Dojo - coding dojo - dojo examples
This module provides function that allows you to manipulate CSS classes of DOM elements.
Initialization
To be able to use the dom-class module we need to load it as fallow :
contains()
- This function checks if a node contains a specific class
Usage
add()
- This function allows you to add CSS Classes to a DOM node without duplication.
Usage
remove()
- This function allows you to remove CSS Classes from a DOM node.
Usage
replace()
- This function allows you to remove classes and replace it with other classes.
Usage
toggle()
- This function allows you to remove a class if it exist, or add it if it doesn't exist.