See http://api.jquery.com/empty
$(selector).empty();
This is definitely the most understandable way and almost certainly the most effective.
Since it is jQuery-internal, it is probably more efficient than .children().remove() , and, of course, no less efficient.
I would have to think that .html('') and .text('') are less efficient since they call html parsers and not just deal with dom nodes like other methods. And even if they turned out to be more efficient, any gain in efficiency could be easily transferred due to a gain in the clarity of using empty (), if you really do not need to optimize this section for a certain reason (in this case, I would just evaluate all the options )
Ben lee
source share