css

The `css` module contains all functionality related to styling elements and applying classes.
Source:

Methods

(static) addClass(name) → {Dollarsign}

Add class name to elements in query.
Source:
Parameters:
Name Type Description
name string Name of the class to add.
Returns:
Type:
Dollarsign
this object.

(static) css(updates) → {Dollarsign}

Alter CSS for all elements in the selection.
Source:
Parameters:
Name Type Description
updates object Hash of CSS rules to apply to each element.
Returns:
Type:
Dollarsign
this object

(static) hasClass(name) → {boolean}

Test whether the given class is associated with these elements.
Source:
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.
Source:
Parameters:
Name Type Description
name string Name of the class to remove.
Returns:
Type:
Dollarsign
this object.

(static) toggleClass(name) → {Dollarsign}

Removes a class if the element(s) have it attached, otherwise adds class to each element.
Source:
Parameters:
Name Type Description
name string Class name.
Returns:
Type:
Dollarsign
this object