before

English[bɪˈfɔ:(r)] US[bɪˈfɔr,-ˈfor]

prep.Before; precede, be superior to; when In front of...; instead of...

conj.before...;before...;earlier than...;with...

adv.before, before; in front, in front

jquery before() method syntax

Function:before() method inserts the specified content before the selected element.

Syntax:$(selector).before(content)

Parameters:

Parameters Description
content Required. Specifies the content to be inserted (can include HTML tags).

Use functions to insert content:Use functions to insert content before the specified element.

Syntax:$(selector).before(function(index))

Parameters:

Parameters Description
function(index) Required. Specifies a function that returns the content to be inserted.
index Optional. Receives the index position of the selector.

jquery before() method example

    

This is a paragraph.

Run instance »

Click the "Run instance" button to view the online instance