peirix
peirix

Reputation: 37751

adding html with jquery

is there a neat way to add html with jQuery instead of

$("#elm").html($("#elm").html() + "some text");

It'd be great to just do $("#elm").html(+= "some text") or something similar...

Upvotes: 2

Views: 146

Answers (1)

Aaron Powell
Aaron Powell

Reputation: 25099

$('#elm').append('some text');

http://docs.jquery.com/Manipulation/append for more information on using append

Upvotes: 6

Related Questions