On May 4, 11:33 am, Olivier Percebois-Garve <perceb...@gmail.com> wrote: > Hi > > I'm puzzled with this :http://pastebin.me/49fef93928aff > > (in firebug click on the jquery object, then expand "0") > > Using empty() or remove() on the lis of a ul, it seems that jQuery is > "faking" to remove them, > i.e the lis will not be accessible by jQuery anymore, but in reality the > childnodes are still there. > Well, at least that's what I can believe from firebug. (Not sure who's > the liar here jQuery, firebug, or me being dumb) > > I'm facing an issue that gets down to that, I really dont understand > whats going on and how to handle it. > (using jQuery 1.2.6) > > I hope I am missing the obvious. Am I ? > > -Olivier
The LIs you see in Firebug are you the ones you appended at the end of your script: $('#u2').append($lis); The childNodes property is a live collection, it updates as you change the DOM. Remove the line I mentioned and you'll see the LIs are being removed correctly, or try appending more items to the list and you'll see childNodes updating accordingly. cheers -- ricardo