Ok, I got this to work now. I now have the collapse code on my <tr> tags and it seems to work so far while inside another collapsible menu.
Is there an advantage to using tbody tags?
It might be that I'm unused to tbody thead etc. that caused the problem. I read that you need to use all three (head body foot) if using it, so since I wasn't that might have been the cause.
EDIT:
Since putting the collapse part on the tr only collapses one row I redid it again with thead, tbody, etc and it wouldn't work.
I decided to have another look at your code sockwater and now discovered that the problem with my code is that my collapsible menus are in the same <table>... so thanks socky!
Since adding new <table>'s would change the layout of my plugin... is there any other tag I can use to wrap around multiple <tr> and make them collapse?