toggleClass Function

Removes the specified class if it exists or adds it if it does not. Returns the handler.

Summary

ElementFunction
ReturnsObject

Arguments

cssString[required] Class to remove from or add to the node.

Example

handler.toggleClass('switch-class');