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
-
<static> has(element, className)
-
Check if an element has a class
Parameters:
Name Type Description element
Element The element
className
String The class
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
-
<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
-
<static> toggle(element, className)
-
Add or remove a class from an element
Parameters:
Name Type Description element
Element The element
className
String The class