I am trying to clear an LI tag's previous data.
Is there another command that will work other than appendTo?
Here is what my code currently looks like:
 var obj = JSON.parse(data);
 $.each(obj, function(index, item)
 {
   $('<li>').
     text(item.datestamp+' - '+item.comment).
     appendTo($('#pCodeComment'));
 });
I asked a similar question not too long ago. I just want to know if there is another command other than appendTo that will clear out the previous data.