Maybe having a method "detach" would bring some clarity?
The removed child node still exists in memory, but is no longer part
of the DOM.
var orphan = this.removeChild(this.firstChild)
Above "orphan " is indeed not a part of the document. Why is this a
problem?
Why would I go back to the document, to try to find a node that I have
just removed ?
someElems.index( removed ) // -1 (the elements you just removed aren't
found!)
//Confused: so what, this is why I removed them ?
Maybe having a method "detach" would bring some clarity?
var preloads = $("img.preload").detach() ; // keep them
$("img.preload").remove() ; // loose them
Where detach() would return a new instance of $(DocumentFragment) with
elements "detached" from their parents. And remove() would return
nothing.
--DBJ
--
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.