Frederick Cheung wrote:
> On Dec 26, 5:14�pm, Gi Ga <rails-mailing-l...@andreas-s.net> wrote:
>> 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


I can't make it work :(

By default div2 is hidden:

<div id="div1">
  <%= link_to_function("Show div2", "Element.toggle('div1', 'div2)") %>
</div>
<div id="div2" style="display:none;">
  <%= link_to_function("Show div1", "Element.toggle('div1', 'div2')") %>
</div>

-- 
Posted via http://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