Class Attribute

jQuery

Category: Class Attribute


These methods inspect and manipulate the CSS classes assigned to elements.

.removeClass()

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

.toggleClass()

Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the switch argument.