appendTo() in jQuery
This method is used to insert every element in the set of matched elements at the end of the target.
Syntax 1
$(selector).appendTo(targetSelector)
- targetSelector - A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element specified in this parameter.
Syntax 2
$(content).appendTo(targetSelector)
- targetSelector - A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element specified in this parameter.
- content - html string or text