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

This may take a few seconds.



if-has-class: selector class;

This conditional action will return true if the selector contains the specified class.

selector = The selector you want to check. This can be any valid CSS selector that will return one result. If more than one result is gotten from the selector, the first one will be chosen.

In this example, this conditional will pass as true if the element #myDiv contains the class ".shadedGreen".

@conditional isShadedGreen {
    if-has-class: #myDiv .shadedGreen;

Note: If you want to check if the event selector has a class, use regular CSS selector syntax in the event selector, such as ".menuItems.selected:click{...}". You do not need to set up a conditional declaration for that scenario.