prepend
UK [pri:'pend] US [pri:'pend]
vt. Consider in advance, plan in advance, plan in advance
jquery prepend() method syntax
Function: prepend() method inserts the specified content at the beginning of the selected element (still inside). The prepend() and prependTo() methods have the same effect. The differences are in the syntax: the position of the content and selectors, and the fact that the prependTo() function cannot be used to insert content.
Syntax: $(selector).prepend(content)
##Parameters:
Description | |
Required. Specifies the content to be inserted (can include HTML tags). |
Use functions to append content: Use functions to insert specified content at the beginning of selected elements.
Syntax: $(selector).prepend(function(index,html))
Parameters:
Description | |
Required. Specifies a function that returns the content to be inserted. | |
Optional. Accepts the index position of the selector. | |
Optional. Accepts the current HTML of the selector. |