Description
The .add() method is used to add elements to the set of matched elements.
This method has the form:
.add(selector)
| Parameter | Description |
|---|---|
| selector | (required) Specifies a string representing a selector expression to find additional elements to add to the set of matched elements |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.add(elements)
| Parameter | Description |
|---|---|
| elements | (required) Specifies one or more elements to add to the set of matched elements |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.add(html)
| Parameter | Description |
|---|---|
| html | (required) Specifies an HTML fragment to add to the set of matched elements |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.add(jQuery object)
| Parameter | Description |
|---|---|
| jQuery object | (required) Specifies an existing jQuery object to match the current set of elements against |
Return Value
This form returns a jQuery object.
This method has an alternate form:
.add(selector, context)
| Parameter | Description |
|---|---|
| selector | (required) Specifies a string representing a selector expression to find additional elements to add to the set of matched elements |
| context | (required) Specifies The point in the document at which the selector should begin matching; similar to the context argument of the
$(selector, context) method
|
Return Value
This form returns a jQuery object.
