If content is added to the DOM using, e.g.,
var newContent=$("ul li:last");
Insert every element in the set of matched elements to the end of the target...
.appendTo()methods perform the same task. The major difference is in the syntax-specifically, in the placement of the content and target. With
.append(), the selector expression preceding the method is the container into which the content is inserted. With
.appendTo(), on the other hand, the content precedes the method, either as a selector expression or as markup created on the fly, and it is inserted into the target container...