jQuery prependTo() Method
jQuery prependTo() Method
The prependTo() method is used to insert HTML elements at the start of the selected elements. For inserting HTML elements at the end of the selected elements, we have to use the appendTo() method.
Syntax:-
Its syntax is:- $(content).prependTo(selector)
Further Explanation:-
Parameter | Description |
---|---|
content | Required. Specifies the content to insert. |
selector | Required. Specifies which elements to prepend the content to |