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.

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()




Let's Work Together!

Javatpoint is passionate to offer better content to the world. Please mail your contribution to contribute@javatpoint.com. We will show your name and create your user profile. You can contribute the following things:
  • Article on Any Topic (which is not available on Javatpoint)
  • Your Interview Experience on Company
  • Company Interview Questions with Answers
  • Recruitment Process of Company
  • Programs, and Algorithm
  • Videos
  • Test Paper
  • Improve Article

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials