Monday, 19 August 2013

jQuery remove all elements wiht .html()

jQuery remove all elements wiht .html()

I use jQuery .html() but it's possible without to remove other html elements?
My code look so:
<div id="contentboxes"><div class="con1">content 1</div><div
class="con1">content 2</div></div>
I have tried this with jquery:
$('#contentboxes').html('<div class="con3">Content 3</div>');
But this command remove my other 2 boxes, it's possible to add without to
remove other boxes?

No comments:

Post a Comment