removeClass()

Removes the specified class from each element in this result set. Has no effect if the class is not present.

removeClass(classname)

classname

String, space separated list of class names.

Examples

This script removes the class name "foo" from all elements in the results that have this class.

results.removeClass("foo");
Selector Matched element Matched element after script execution
p ​<p class="foo">Hello world</p> <p>Hello world</p>​