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.addClass("foo");
Selector Matched element Matched element after script execution
p ​<p class="foo">Hello world</p> <p>Hello world</p>​
 
  • Last Topic Update: 22, December, 2016 10:34 AM
  • Last Published: 23, May, 2019 01:55 PM