How do I make toggle appear not disapear

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 %>
<% end -%>

  <% @role = role%>  </li>
  <div id=<%= divid %> >
     <% for service in @role.services  -%>
        <ul  style ="font-size: 80%; color: #99cc99; text-indent: 

1em">
<%= service.name %>
<% end -%>

how bout setting

  <div id=<%= divid %> >

to <div id=<%= divid %> style=“display:none;”>

Perfect! I have been trying to figure that out for three days.
Thank you so much Shai

On Oct 2, 4:22 am, Shai R. [email protected]