2019.1

Table Of Contents
Function Description
size() Gets the number of elements in this result set. Equivalent to the
length property.
"tagName()" on
page1255
Returns the HTML tag name of the first element in this result set, in
uppercase. For an example see: "Creating a Table Of Contents" on
page845.
"Example" on
page1255
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
page1256
Gets or sets the outer width of an element, including padding and
borders.
add()
The add() function allowsyou to add elements to a set of HTML elements that match the
selector of the script or of another query in the template (see "query()" on page1278).
add(content)
Returns the union of this result or result set and other content.
content
A query result. This can be an HTML string or a result set.
Examples
Add one result set to another
This script adds one query result to another and sets the background color to yellow.
query("#test1").add(query("#test2")).css("background", "yellow");
Note: the way the functions add() and css() are used in this script is called 'chaining'. Chaining
is optional; the same could be achieved by storing the results of the queries in a variable:
Page 1226