There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.
Close

Processing...
This may take a few seconds.

add-class

Syntax

add-class: (class) [every (time)] [after (time)][, (class)...];

time = Time in standard CSS time format, eg. 1s = 1 second, 250ms = 250 milliseconds.

This command adds a class to the target selector if the class is not already present. No conditional statement is needed from you to check if the class is already there or not, as this is done internally.

add-class