1.4

()" on page
210
set of HTML elements. Has no effect if the class is not present.
"replaceWith
()" on page
211
Replaces an HTML element or a set of HTML elements (with a snippet, for
example). Returns the result set.
show() Shows the HTML element or a set of HTML elements.
text() 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.
Examples of iterator functions
"Each" on
page 197
A generic iterator function, to iterate over the elements in the result set
"For...in" on
page 199
Iterates over the enumerable properties of an object, in arbitrary order. For
each distinct property, statements can be executed.
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 page 209).
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");
Page 179