<!DOCTYPE html>
<html>
<head>
<title>jQuery insertBefore() method</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("<p>New text come before the selected element.</p>").insertBefore("p");
});
});
</script>
</head>
<body>
<div>
<p>First paragraph start here...</p>
</div>
<button>Click Me</button>
</body>
</html>