On Nov 27, 2007, at 1:04 PM, bdee1 wrote:

>
> ok so thats good to know - i just need scriptaculous.
>
> now i have been digging through the prototype API documentation and
> found the $$ function.
>
> so i tried this:
> onclick="$$('.search').toggle();"
>
> but i get the following error:
> $$(".search").toggle is not a function
>
> what did i do wrong?

$$() returns an array.  Toggle works on elements.  Like a previous  
poster suggested, use invoke("toggle"), which will toggle each of the  
elements in the array... that may not be quite what you want.



TAG



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