jQuery | appendTo() with Examples
The appendTo() is an inbuilt method in jQuery that is used to insert HTML element at the end of the selected element.
Here the element content specifies the content to be inserted.
Parameters: It accepts a parameters “selector” which specifies the elements to which content will be appended.
Return Value: It returns the modified selected element.
In the below code, id content with element “span” will be append to id “#hel” element.
In the below code, we are directly appending a “p” element using this method.