2021.1

Table Of Contents
removeClass()
Removes the specified class from the current HTML element or from each element in a result
set. This 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>
replaceWith()
Replaces one HTML element or each element in a set of HTML elements.
replaceWith(content)
Replaces one HTML element or each element in a set of HTML elements. Returns the result
set.
content
A query result. This can be an HTML string or a result set.
Examples
Replace elements with a snippet
The following script loads a snippet and then replaces the elements matched by the script's
selector with the snippet.
var snippet = loadhtml('snippets/mysnippet.html');
results.replaceWith(snippet);
Page 1341