Adds or removes a list of CSS classes to/from the given element.
IMPORTANT: When constructed, it removes all given classes from the element as a form of initialization.
To use with auto-widgets (HTML API) as part of a trigger specification:
<div data-lisn-on-view="@add-class: clsA, clsB"></div> Copy
<div data-lisn-on-view="@add-class: clsA, clsB"></div>
Static
Readonly
Adds the classes given to the constructor.
Toggles each class given to the constructor.
Removes the classes given to the constructor.
Adds or removes a list of CSS classes to/from the given element.
IMPORTANT: When constructed, it removes all given classes from the element as a form of initialization.
To use with auto-widgets (HTML API) as part of a trigger specification:
Example