Javatpoint Logo
Javatpoint Logo

jQuery after()

The jQuery after() method is used to insert specified content after the selected element. It is just like jQuery append() method.

If you want to insert content before the selected element, you should use jQuery before() method.

Syntax:

Parameters of jQuery after() method

Parameter Description
Content It is a mandatory parameter. It specifies the content to insert. Its possible values are:
  • HTML elements
  • jQuery objects
  • DOM elements
Function (index) It specifies a function that returns the content which is used to insert.
  • index: It provides the index position of the element in the set.

Example of jQuery after() method

Let's see an example of jQuery after() method:

Test it Now

Output:

This is a tutorial website.

This is a training institute.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA