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.



Let’s see, Example of jQuery appendTo() method:

<!DOCTYPE html>
    <title>Example of jQuery appendTo method</title>
    <script type="text/javascript" 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>

 Let's check live example

Leave a comment

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

You may also like