codeGK
Code it ALL
jQuery before() - CodeGK

♦ 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.
Example
Input:
Output: