append() in jQuery
This method is used to insert content, at the end of each element in the set of matched elements.
Syntax 1
$(selector).append(content[,content])
- content - HTML string, DOM element, text node, array of elements and text nodes, or jQuery object to be inserted before each element in the set of matched elements.
Syntax 2
$(selector).append(function(index,currentElement))
- index - Index position of the element in the set.
- currentElement - old HTML value of the element.