On Dec 26, 5:14 pm, Gi Ga <rails-mailing-l...@andreas-s.net> wrote:
> I have 2 divs:
>
> <div id="div1">  <%= link_to_function("Show div2",
> "Element.toggle('div2')") %> </div>
> <div id="div2">  <%= link_to_function("Show div1",
> "Element.toggle('div1')") %> </div>
>
> I want, when I click link: "Show div2" it hide div1 and show div2,
> when i click "Show div1" it hide div2 and show div1
>
> How can i do it?

just make your call to link_to function toggle both divs - you aren't
limited to a single javascript statement.

Fred
> --
> 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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to