How to collapse nodes


My curent theme allows me to collapse nodes,
I have a question for you, Are you referring to Nodes ( category ) and sub-nodes, ( Sub-category )?
If so, I am trying to do this myself. How can I get the Sub-categories to collapse with-in the category?
I have asked this question here but no replies. My home page is quite large with many Nodes ( Categories ) and each one of those has numerous Sub-nodes ( Sub-Categories ) If I was able to Expand/collapse the Sub-Categories with-in each category this would make my home page much smaller and user friendly. right now my members have to scroll down or up a lot just to find what they want.
If this is what you have, can you please inform me how you did this. Just trying to make things more user friendly for my members.

Thank you in advance