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