Method 1:
Insert content after each p element:
$("button").click(function(){
$("p").after("
Hello world!
");
});
Method 2:
$("button").click(function(){
$("p").after(function(n){
) return "
The p element above has index " n "< /p>";
});
});
The function in after must return an html string.