jQuery appendTo() Method
jQuery appendTo() Method
The appendTo() method is used to insert HTML elements at the end of the selected elements. For inserting HTML elements at the beginning of the selected elements, we have to use the prependTo() method.
Syntax:-
Its syntax is:- $(content).appendTo(selector)
Further Explanation:-
Parameter | Description |
---|---|
content | Required. Specifies the content to insert. |
selector | Required. Specifies which elements to append the content to |