Adds the specified class if it is not present, and removes the specified class if it is present, using an optional transition.
Arguments:
| class | String | |
|---|---|---|
| A CSS class to toggle on the elements. | ||
| duration (Optional) | String, Number | |
| A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). | ||