2022.1

Table Of Contents
["ItemOrdered"]);
row.find('@ItemTotal@').text( record.tables['detail'][i].fields
["ItemTotal"]);
row.find('@ItemDesc@').text( record.tables['detail'][i].fields
["ItemDesc"]);
row.find('@nr@').text( i );
results.parent().append(row);
}
// Hide our boilerplate row (note that this doesn't really delete
the row).
results.hide();
closest()
This function gets the first parent element that matches a selector, by testing the element itself
and traversing up through its ancestors in the DOM tree. (In HTML, a parent is an element that
contains another element.)
The function can be used for:
l The elements that match the selector of a script (see "results" on page1509).
l One element that matches the selector of a script that runs for "Each matched element"
(see "this" on page1425 and "Setting the scope of a script" on page924).
l The elements returned by a query in the template (see "query()" on page1379).
To get a child element or all child elements, use children() (see "children()" on page1441).
The closest() command is based on the closest() command found in the jQuery library:
https://api.jquery.com/closest/.
To get an element's sibling element, you can use "prev()" on page1458 or "next()" on
page1451.
closest(selector)
For one HTML element or for each element in a set, this function gets the first element that
matches the selector by testing the element itself and traversing up through its ancestors in the
DOM tree.
selector
Page 1443