toggle_classΒΆ

Toggle a CSS class from an HTML element.

Example:

{% button action={toggle_class target="myid" class="newclass"} %}

When the HTML element with id “myid” has the CSS class “newclass” then it is removed, otherwise it is added.

See also

actions add_class and remove_class.

Previous topic

toggle

Next topic

trigger_event

Versions

Actions