Perhaps .destroy should also clean out the jQuery array as well. Less 
surprises if .destroy actually means absolute destruction of the nodes 
and removing reference to them to avoid reuse.

$('select#from option').destroy(':not(:selected)').appendTo('select#to');

var _limbo;
function limbo(node) {
  if(node) $(node).append(_limbo);
  else _limbo = $('#foo').detach();
}

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com]
-Nadir-Point & Wiki-Tools (http://nadir-point.com) (http://wiki-tools.com)
-MonkeyScript (http://monkeyscript.org)
-Animepedia (http://anime.wikia.com)
-Narutopedia (http://naruto.wikia.com)
-Soul Eater Wiki (http://souleater.wikia.com)



Már Örlygsson wrote:
> Since I notice that the [jQuery 1.4 Roadmap](http://docs.jquery.com/
> JQuery_1.4_Roadmap) lists this feature:
>
>   
>> * Implement a `.extract()`/`.detach()` method (remove the element from the 
>> DOM, leaves events and data intact)
>>     
>
> I'd like to make a suggestion - that the `.remove()` method be
> deprecated in favor of a more aptly named `.destroy()` method.
> (Of course `.remove()` should still work, but it's use would be
> discouraged - a bit like the suggested renaming of `.get()` to
> `.toArray()`)
>
> Thus we'd have two quite unambiguously named methods - `.destroy()`
> and `.detach()` - with no nasty surprises attached. :-)
>
>
> --
> Már Örlygsson
> >
>   

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to