<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").after("Mahak Garg");
});
});
</script>
</head>
<body>
<h2>This is an Example of after method</h2>
<p>My Name is</p>
<p>I am</p>
<button>Click me!!!</button>
</body>
</html>
Output:
After we click on the button: