> var uniqueDiv = $('div#unique');
> uniqueDiv.length == 1;
> uniqueDiv.remove();
> uniqueDiv.length == 1; // OK... not an expected behaviour, is it?! ;-)Diogo, that is actually expected because you may often want to remove the element from the DOM and insert it later. You wouldn't want the element to disappear from your jQuery object just because it was removed from the DOM. I can definitely see the usefulness of being able to detect whether the element is still in the DOM though. For the implementation it would probably be fastest to use the contains or compareDocumentPosition methods; John did a writeup earlier in the year. http://ejohn.org/blog/comparing-document-position/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
