Javatpoint Logo
Javatpoint Logo

jQuery append()

The jQuery append() method is used to insert specified content as the last child (at the end of) the selected elements in the jQuery collection.

The append () and appendTo () methods are used to perform the same task. The only difference between them is in the syntax.


Parameters of jQuery append() method

Parameter Description
Content It is a mandatory parameter. It specifies the content which you want to insert. Its possible values are:
  • HTML elements
  • jQuery objects
  • DOM elements
Function (index,html) It is an optional parameter. It specifies the function that returns the content to insert.
  • Index: It returns the index position of the element in the set.
  • HTML: It returns the current HTML of the selected element.

Example of jQuery append() method

Let's take an example to demonstrate the jQuery append() method.

Test it Now
Next TopicjQuery appendto()

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA