Jean-Philippe Encausse
2007-Feb-02 14:39 UTC
Quick Element.getElementsBySelector() question
Hi,
Does this code should works ?
elm.getElementsBySelector(''UL.class1 > LI.class2'');
I have an error caused by "UL.class1 > LI.class2"
- Does CSS Selector ">" works ?
- What is the exact ? may be "UL.class1>LI.class2"
Regards,
--
Jean-Philippe Encausse - R&D Jalios SA
Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com
GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net
Mob: +33 6 82 12 56 99 Jalios: +33 1 39 23 92 83 Tel: +33 1 39 18 90 15
Do it Once, Use it Twice ~ Do it Twice, Make It Once
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2007-Feb-02 14:46 UTC
Re: Quick Element.getElementsBySelector() question
Hey there, Jean-Philippe Encausse a écrit :> - Does CSS Selector ">" works ? > - What is the exact ? may be "UL.class1>LI.class2"The immediate-child selector (>) is not yet implemented, as clearly stated on the documentation site: http://prototypejs.org/api/utility/dollar-dollar BTW, putting whitespace around it is not the "official" syntax, but is not an issue either. Also, do you actually need immediate child? I mean, do you have any LI.class2 element inside UL.class1 that would *not* be an immediate child? If not, then just use the descendant selector ('' ''), as in: UL.class1 LI.class2 -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jean-Philippe Encausse
2007-Feb-02 16:13 UTC
Re: Quick Element.getElementsBySelector() question
Well, the work around I did is:
getElementBySelector(''UL.class1'') then elm.down()
Thanks
On 2/2/07, Christophe Porteneuve
<tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>
wrote:>
> Hey there,
>
> Jean-Philippe Encausse a écrit :
> > - Does CSS Selector ">" works ?
> > - What is the exact ? may be "UL.class1>LI.class2"
>
> The immediate-child selector (>) is not yet implemented, as clearly
> stated on the documentation site:
>
> http://prototypejs.org/api/utility/dollar-dollar
>
> BTW, putting whitespace around it is not the "official" syntax,
but is
> not an issue either.
>
> Also, do you actually need immediate child? I mean, do you have any
> LI.class2 element inside UL.class1 that would *not* be an immediate
> child? If not, then just use the descendant selector (''
''), as in:
>
> UL.class1 LI.class2
>
> --
> Christophe Porteneuve aka TDD
> tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org
>
> >
>
--
Jean-Philippe Encausse - R&D Jalios SA
Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com
GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net
Mob: +33 6 82 12 56 99 Jalios: +33 1 39 23 92 83 Tel: +33 1 39 18 90 15
Do it Once, Use it Twice ~ Do it Twice, Make It Once
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---