jQuery before method : is used to add new html element(content) before the selected element ie outside of the element. It adds html element before the selected element.
We are going to explain this method with the help of example demo.
Syntax
Syntax for before method โ
$(selector).before('some......content');
jQuery before Method Example
Example of before method is given below try it to see output-
When you run the above example it will produce the output like this โ