Jquery Add

append()

It inserts the specified element as the last child of the target element.

$('.info').append("<p>Stuff!</p>"); 


prepend()

It inserts the specified element as the first child of the target element.

$(".info").prepend("<p>Stuff!</p>"); 


after()

It insert the specified element after the targeted element.

$(".info").after("<p>Stuff!</p>"); 


before()

It insert the specified element before the targeted element.

$(".info").before("<p>Stuff!</p>"); 

Share this

Related Posts