tags:

views:

35

answers:

1

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...

+5  A: 
$('#elm').append('some text');

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

Slace
So doing this would just append a text node?
peirix
if you do .append('<span>some text</span>') you'll get it in a span ;)
Slace