1.8

Table Of Contents
// Attach all copies to the DOM as children of tbody
results.append(rows);
removeAttr()
Removes the specified HTML attribute from an element or from each element in a set of
elements. To add or change an attribute, use attr() (see "Examples" on page889).
removeAttr(attributeName)
attributeName
String; the name of the attribute.
Examples
This script looks up an email field in a form (which is an <input> with the ID #email1) and
removes its readonly attribute.
query("#email1").removeAttr('readonly');
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>
Page 906