.prepend() Method

Syntax

.prepend()

Description

jQuery .prepend() is one of the methods which allows to insert or append content at the beginning of the specified element. .prepend( function(index,html)) is the function that can return the HTML to the beginning of the specified element.Below example clearly shows you how to append the content using .prepend() function.

Example Code

Result:

Prepending the Text

jQuery Tutorial
This is .prepend() jQuery


Ask Questions

Ask Question