Ruby on Rails Wednesday, September 1, 2010

Edmond, Thanks for the response. It helped set me in the right
direction!


I put this in the show.html.erb:

<a href="#" onclick="Element.toggle('response_a')">A</a>
<a href="#" onclick="Element.toggle('response_b')">B</a>
<a href="#" onclick="Element.toggle('response_c')">C</a>

and this in the .css:

#response_a {display: none}
#response_b {display: none}
#response_c {display: none}


Only problem is it only toggles if I change 'display: none' to 'display:
""'. And then it doesn't hide the responses when the page initially
renders, which I need it to do. Any ideas??

Thanks again,
Dave
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment