In my partial I iterate displaying many ''roles'' in a side bar.
each role has 0 or more services. I then iterated over the services
and set their div id to that of the parent service ( you will notice
in the code that I had to take the white space out with the delete
tag.
I made a link_to_function that will toggle on the service div id.
This works well but when the page is rendered I see the services but i
want them hidden by default. How do I set the toggle to default hide
the div id?
Thanks in advance Kyle.
<% divid = role.name.delete " " %>
<%= link_to_function role.name do |page|
page.toggle divid
end
%>
<% @role = role%> </li>
<div id=<%= divid %> >
<% for service in @role.services -%>
<ul style ="font-size: 80%; color: #99cc99; text-indent:
1em">
<%= service.name %> </ul>
<% end -%>
</div>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---