|
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()). 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. ExamplesAdd one result set to anotherThis script adds one query result to another and sets the background color to 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:
Creating an empty result set and adding elements to itThe following script loads snippets in an iteration and adds their elements to an empty result set (using
|
|