lundi 12 janvier 2015

Jquery command other than appendTo


Vote count:

0




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.


Please help.



asked 56 secs ago







Jquery command other than appendTo

Aucun commentaire:

Enregistrer un commentaire