jQuery add() Method
jQuery add() Method
The add() method is used to add elements to an existing group of elements. It adds elements to the whole document. If the context parameter is specified it will add inside that item.
Syntax:-
Its syntax is:- $(selector).add(element,context)
Further Explanation:-
Parameter | Description |
---|---|
element | Required. Specifies a selector expression, a jQuery object, one or more elements or an HTML snippet to be added to an existing group of elements |
context | Optional. Specifies the point in the document at which the selector expression should begin matching |