jQuery removeClass() Method

Last Updated Jul 21, 2015, 12:00:06 PM





jQuery removeClass() Method

jQuery removeClass() method is used to remove specific CSS class and it's styles from the set of matched elements.

Syntax
Note:

If a class name is mentioned as a parameter, then the particular class will be removed from the group of matched elements. If no class names are specified in the parameter, all classes will be deleted.

Example
HTML

jQuery

In the above HTML code, we have styled the two paragraph elements with a blue color text. Using the jquery removeClass() method we can simply remove those style by targeting the two css classes badClass. See it in action by running the code in live editor

The above jquery removeClass() method will produce the following output


jQuery removeClass() method
Try It Now

jQuery DOM Reference


Other Advanced jQuery and DOM topics you might want to learn
jQuery Basic DOM Methods

jQuery DOM Removal

jQuery DOM Insertion Inside

jQuery DOM Insertion Outside

jQuery DOM Insertion Around

Sources and Credits

The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation

Last Updated Jul 21, 2015, 12:00:06 PM