In this article we will explain how to add specified content at the end of the selected element in jquery or What is appendTo() method in jquery or why use appendTo() method in jquery with example.


jQuery appendTo() method is used to insert additional content at the end of the selected elements. It is same as jQuery append() method. There is only syntactical difference between append() and appendTo() methods.

To insert content at the beginning of the selected elements, use the prependTo() method.



Example of jQuery appendTo() method

Let's  see an example of  jQuery appendTo() method.

<!DOCTYPE html>  
<script src=""></script> 
    $(document).ready(function () {
        $("button").click(function () {
<button>Add new content at the end of each div element</button> 
<div>This is tutorials website for learning new technologies.</div>    



Use of jQuery appendTo() method

I hope it will help to you.


Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

you may also like