Description:

The jQuery append() method is used to insert specified content to the end of the set of matched elements.

Syntax

  • $(selector).append(content)
  • $(selector).append(content, function(index, html))
Content It specifies the content which need to append.
Function (index,html) It specifies the function that returns(HTML string, DOM element(s)) the content to insert.

Index: Returns the index position of the element.

HTML: Returns the current HTML of the selected element.

Example: 

Output: 

dotnet-helpers-com-jquery-append-method-thiyagu-dotnethelpers