Namespace: cls

hui. cls

Source:

Methods


<static> add(element, className)

Add a class to an element

Parameters:
Name Type Description
element Element

The element to add the class to

className String

The class

Source:

<static> has(element, className)

Check if an element has a class

Parameters:
Name Type Description
element Element

The element

className String

The class

Source:
Returns:

true if the element has the class

Type
boolean

<static> remove(element, className)

Remove a class from an element

Parameters:
Name Type Description
element Element

The element to remove the class from

className String

The class

Source:

<static> set(element, className, add)

Add or remove a class from an element

Parameters:
Name Type Description
element Element

The element

className String

The class

add boolean

If the class should be added or removed

Source:

<static> toggle(element, className)

Add or remove a class from an element

Parameters:
Name Type Description
element Element

The element

className String

The class

Source: