views:

83

answers:

0

Possible Duplicate:
What is the difference between .empty().append() and .html() in jQuery?

  1. Using jQuery, is there a difference in performance between:

    $('#somDiv').empty().append('text To Insert')
    

    and

    $('#somDiv').html('text To Insert')
    

    ?

  2. 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')
    

    ?