Hi there.  I posted this before but wanted to change the subject.  I
want to have a collapsible div inside of a for loop.  I''ve been messing
around with it and could only get 1 item out of a few to be able to
hide.  I''m just using this:
<script language="javascript">
  function toggleDiv(divid){
    if(document.getElementById(divid).style.display ==
''none''){
      document.getElementById(divid).style.display = ''block'';
    }else{
      document.getElementById(divid).style.display = ''none'';
    }
  }
</script>
Now, I have for example a major category, with many items in that
category.  What I want to do is, show the category name, but under this
category, hide the related items.  This is done is one loop since I have
a HASBTM relationship.  For example then in pseudo code:
for each cat in cateogry  /possible cats are kitchen, living room,
garage
<table>
<tr>
 <td>Kitchen (show more)</td>
</tr>
<tr>
 div
   <td>knife $3.00 Buy Now</td>
   <td>Spatula $5.00 Buy Now</td>
   ...etc
 /div
</tr>
</table>
I want to do something like this.  Any help would be nice
-- 
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-/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
-~----------~----~----~----~------~----~------~--~---