jQuery append() Method
jQuery append() Method
The append() method is used to insert specified content at the end of the selected elements. For inserting content at the beginning of the selected elements, we have to use the prepend() method.
Syntax:-
Its syntax is:- $(selector).append(content, function(index,html))
Further Explanation:-
Parameter | Description |
---|---|
content | Required. Specifies the content to insert. |
function(index,html) | Optional. Specifies a function that returns the content to insert
|