the group might correct me if im wrong but i think you might be able to use
invoke

['hello', 'world', 'cool!'].invoke('substring', 0, 3)
// ['hel', 'wor', 'coo']
soo

$$("#idSelector li").invoke('addClassName','myClass');

Gareth

On 6/9/07, Camsoft <[EMAIL PROTECTED]> wrote:
>
>
> I'm trying to apply a css class to all LI elements that are children
> of an element with the ID "idSelector".
> This is what I did and it works. But I was wondering if there was an
> easier way without having to use an anonymous function?
>
> $$("#idSelector li").each(function()
> { arguments[0].addClassName("myClass") });
>
> Thanks in advance.
>
>
> >
>

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