try

link_to_function "+", "Effect.toggle ('$('something')', 'slide');"

this should, if it works, throw in a nice sliding effect for u too..

On Apr 19, 4:05 pm, Frederick Cheung <[email protected]>
wrote:
> On Apr 19, 11:07 am, Marika Ahonen <[email protected]>
> wrote:
>
> > Frederick Cheung wrote:
>
> > Thanks again :) I don't really know how I am supposed to do that :( I'm
> > doing:
> > <% linkki = ('link_long_'+link.id.to_s).toggle %>
>
> If you do that you're trying to call a ruby function called toggle.
> What you want to do is generate a javascript fragment that calls a
> toggle function, so .toggle() needs to be inside the string that you
> generate, not outside as it is here.
>
> Fred
>
> > <%= link_to_function "+", linkki, :style => 'text-decoration:none' %>
> > --
> > Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to