Is there a way you could change the identifier to a classname?

$$('div.myClass') always returns an array, even if it's an array of one.

Walter

On Mar 7, 2008, at 11:42 AM, Tarscher wrote:

>
> Hi all,
>
> I have a dynamic list of divs I want to add a class to:
> $('dynamic').invoke('addClassName', 'border')
>
> The list can also only contain 1 div resulting in a unknown function
> addClassName . Is this caused by the fact that there is only 1 div? Is
> there a way around this?
>
> thanks
> Stijn
> >


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