Go to page content

add_class

Add a class to an element.

Example:

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

Adds the CSS class "newclass" to the element with HTML id "myid".

See also the actions remove_class and toggle_class.

This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.