The `css` module contains all functionality related to styling
elements and applying classes.
Methods
(static) addClass(name) → {Dollarsign}
Add class name to elements in query.
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Name of the class to add. |
(static) css(updates) → {Dollarsign}
Alter CSS for all elements in the selection.
Parameters:
Name | Type | Description |
---|---|---|
updates |
object
|
Hash of CSS rules to apply to each element. |
(static) hasClass(name) → {boolean}
Test whether the given class is associated with these elements.
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Returns:
- Type:
-
boolean
`true` if class is applied to given element, `false` otherwise.
(static) removeClass(name) → {Dollarsign}
Remove class name from elements in query.
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Name of the class to remove. |
(static) toggleClass(name) → {Dollarsign}
Removes a class if the element(s) have it attached, otherwise adds
class to each element.
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
Class name. |