On Apr 18, 5:10 pm, Marika Ahonen <[email protected]>
wrote:
> I have a list in my page and I want to show there additional information
> like:
>
> my link
> + show me more
> my 2 link
> + show me more
> etc..
>
> I have a element for hidden info:
> <div id="link_long_<%= link.id %>" style="display:none">
> <%= link.long %>
> </div>
>
> How can I pass a link id with something like this:
>
> <%= link_to_function "+", "link_long_id".toggle(), :style =>
> 'text-decoration:none' %></td>
well assuming the link had id 23, the javascript you'd want to
generate would be $('link_long_23').toggle() - just build up that
string, using the usual string interpolation stuff for example
Fred
> This does not work.
>
> Thank you!
> --
> 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
-~----------~----~----~----~------~----~------~--~---