Possible Duplicate:
What is the difference between .empty().append() and .html() in jQuery?
Using jQuery, is there a difference in performance between:
$('#somDiv').empty().append('text To Insert')
and
$('#somDiv').html('text To Insert')
?
Also, does one method parse the input as a DOM object before the insert vs simply just inserting? (Meaning, does method simply inject the HTML vs internally creating a DOM object)?
$('#somDiv').empty().append('text to Insert')
vs
$('#somDiv').html('text to Insert')
?