Home/Jquery/.prependTo() method in Jquery

.prependTo() method in Jquery

Description:

The Jquery prependTo() method is used to add additional content at the beginning of the selected elements. It is same like as prepend() method, it will add content as the first child of the selected elements. The main difference is their syntax-specifically, in the placement of the target and content location.

Syntax

  • $(content).prependTo(selector)

Example: 

Output: 

dotnet-helpers-com-jquery-prepend-method-thiyagu-dotnethelpers

Leave A Comment