♦ jQuery before()
♣ Example4: jQuery before()
Inserts Textual/HTML data before the selected HTML elements.Basic Syntax
$(selector).before(data);
selector: the HTML element to be selected.
data: the data to inserted Above the selected HTML element.
In this example, jQuery before() method is illustrated.data: the data to inserted Above the selected HTML element.
Example
Input:
Output: