dojo.toggleClass
<script src="../../js/dojo.js"></script>
defined in dojo/_base/html.js
Adds a class to node if not present, or removes if present. Pass a boolean condition if you want to explicitly add or remove.
parameter | type | description |
---|---|---|
node | DomNode|String | |
classStr | String | |
condition | Boolean | Optional. If passed, true means to add the class, false means to remove. |