This is feature that always seemed to be missing from prototype to me. I love the way $$() takes any number to css selectors, ie $$ (''.container table tbody td.name a'') I have and element, container, which I want to get all the ''table tbody td name aa'' elements. However, I can''t do this container.$$ (''.container table tbody td.name a''), and down() only takes one className, so I''m kinda lost on how to do this. anybody? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Here is what $$ actually is: Selector.findChildElements(document, $A(arguments)) So just replace document with your container element. The second parameter is an array of selectors. Selector.findChildElements(container, [''table tbody td.name a'']); On Jun 30, 7:40 pm, eggie5 <egg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This is feature that always seemed to be missing from prototype to me. > > I love the way $$() takes any number to css selectors, ie $$ > (''.container table tbody td.name a'') > > I have and element, container, which I want to get all the ''table > tbody td name aa'' elements. However, I can''t do this container.$$ > (''.container table tbody td.name a''), and down() only takes one > className, so I''m kinda lost on how to do this. > > anybody?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
thanks! On Jun 30, 5:04 pm, jharwig <jason.har...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Here is what $$ actually is: > Selector.findChildElements(document, $A(arguments)) > > So just replace document with your container element. The second > parameter is an array of selectors. > > Selector.findChildElements(container, [''table tbody td.name a'']); > > On Jun 30, 7:40 pm, eggie5 <egg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > This is feature that always seemed to be missing from prototype to me. > > > I love the way $$() takes any number to css selectors, ie $$ > > (''.container table tbody td.name a'') > > > I have and element, container, which I want to get all the ''table > > tbody td name aa'' elements. However, I can''t do this container.$$ > > (''.container table tbody td.name a''), and down() only takes one > > className, so I''m kinda lost on how to do this. > > > anybody?--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
jharwig wrote:> Here is what $$ actually is: > Selector.findChildElements(document, $A(arguments)) > > So just replace document with your container element. The second > parameter is an array of selectors. > > Selector.findChildElements(container, [''table tbody td.name a'']); >You can also do : $(container).getElementsBySelector([''td.name a''],[''td.name2 a'']); see http://prototypejs.org/api/element/getelementsbyselector --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---