Actually maybe new method is not needed. Instead maybe new argument to
"remove()" will
bring an end (and clarity) to the removal saga ?

var orphanage = document.createElement("div");
$("div.foo").remove( orphanage ) ;

If orphanage is provided, removed elements (aka "orphans") will be
added to it.
If not, they are (sadly) lost forever. They are NOT kept inside the
jQuery instance that WAS
pointing to them, BEFORE they have been removed.

$("div.foo").length === 0 // true

Furthermore, I still think, remove() should cut the chaining, in order
to clarify its role.
And to avoid confusion:

$("div.foo").remove(/* optional orphanage */).add("<h1>Where am I?</
h1>")

(probably) add H1 to empty $("div.foo"). What is the point of that?

--DBJ


--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to