2022.2

Table Of Contents
Function Description
position() Returnsinformationabouttheposition(seeNodePosition)ofthefirstelementinthisresultset,excludingmargins.To
includemargins,callposition(true).
"prepend()"on
page806
InsertscontentatthebeginningofanHTMLelementorofeachelementinasetofHTMLelements.
"prev()"onpage809 ReturnstheprevioussiblingofeachHTMLelementintheresultset.
"remove()"on
page810
RemovesanHTMLelementorasetofHTMLelementsfromthedocument.
"removeAttr()"on
page810
Removesthespecifiedattributefromeachelementinthisresultset.
"removeClass()"on
page811
RemovesthespecifiedclassfromanelementorfromeachelementinasetofHTMLelements.Hasnoeffectiftheclassisnot
present.
"replaceWith()"on
page811
ReplacesanHTMLelementorasetofHTMLelements(withasnippet,forexample).Returnstheresultset.
"show()"onpage812 ShowstheHTMLelementorasetofHTMLelements.
size() Getsthenumberofelementsinthisresultset.Equivalenttothelengthproperty.
"tagName()"on
page812
ReturnstheHTMLtagnameofthefirstelementinthisresultset,inuppercase.Foranexamplesee:"CreatingaTableOfCon-
tents"onpage411.
"text()"onpage813 ReplacesthetextcontentofanHTMLelementorofeachelementinasetofHTMLelementswiththesuppliedvalue,orreturnsthe
textcontentofthefirstelementifnovalueissupplied.
"width()"onpage813 Getsorsetstheouterwidthofanelement,includingpaddingandborders.
add()
Theadd()functionaddselementstooneormoreHTMLelements,whichcanbe:
l
Theelementsthatmatchtheselectorofascript(see"results"onpage844).
l
Oneelementthatmatchestheselectorofascriptthatrunsfor"Eachmatchedelement"(see
"this"onpage781and"Settingthescopeofascript"onpage373).
l
Theelementsreturnedbyaqueryinthetemplate(see"query()"onpage742).
Page 748