Hey there,

> That was my primary question anyway. I guess it doesn't really matter if $$()
> doesn't do all that getElementsBySelector() does since it's just a shortcut.

Uh?!

1) $$ boils is:

     return Selector.findChildElements(document, $A(arguments));


2) getElementsBySelector boils down to:

     return Selector.findChildElements(element, args);

So the only difference is the initial scope, really.  If you want to use 
$$ instead of the (verbose) $('someID').getElementsBySelector(...), just 
say $$('#someID ...').  Won't be slower, I promise you that.

However, if you already have an element reference, turning over to $$ 
with something like $$('#' + elt.id + ' ...') is essentially a useless 
roundtrip: you scope out to scope in again.

-- 
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to