The jQuery .insertAfter() API allows you to insert content after the specified elements. It is similar to the .after() method, but the syntax is a bit different.

<div id="welcomeBox">
    <h3>Welcome to our site.</h3>

<script type="text/javascript">
    $(document).ready(function() {
        $(<h3>John Smith</h3>).insertAfter("#welcomeBox h2");  

The .insertAfter() method finds all of the instances of what has been specified with what is in its parentheses, then inserts the contents of the selector into the HTML after the selector. This can be done for one instance on the page, or it can place this content into several locations.

The .insertAfter() method is great for personalizing web pages on the fly.

Three dot cartouche

Methods similar to .after()

The .insertAfter() method is very useful and allows you to add something after a specified element. There are other methods that might work a little bit better for certain similar situations.

♦ .after() the syntax for this method is different in that the contents of the parentheses for .after()  is what is inserted after what is in the selector for the method

♦ .append() this method will add content to the end of what already exists 

♦ .html() this method will allow you to insert HTML content into a specified element or retrieve the HTML content of that element for other uses.