2022.2

Table Of Contents
removeAttr()
RemovesthespecifiedHTMLattributefromanelementorfromeachelementinasetofelements.To
addorchangeanattribute,useattr()(see"attr()"onpage1247).
removeAttr(attributeName)
attributeName
String;thenameoftheattribute.
Examples
Thisscriptlooksupanemailfieldinaform(whichisan<input>withtheID#email1)andremovesits
readonlyattribute.
query("#email1").removeAttr('readonly');
removeClass()
RemovesthespecifiedclassfromthecurrentHTMLelementorfromeachelementinaresultset.This
hasnoeffectiftheclassisnotpresent.
removeClass(classname)
classname
String,spaceseparatedlistofclassnames.
Examples
Thisscriptremovestheclassname"foo"fromallelementsintheresults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()
ReplacesoneHTMLelementoreachelementinasetofHTMLelements.
Page 1233