Help with expanding/collapsing table rows

Help with expanding/collapsing table rows

Hello all,
 
I have a table with rows than can be expanded/collapsed by clicking on a +/- button. Initially, all the child table rows are collapsed.
 
To give you some insight, this is a FAQ page, with several headings. Someone may link (via an anchor) to a particular heading on this page. What I would like to do, is have this table row expand (visible) if it was linked to via an achor.
 
How I think this will work is when a anchor/link on page 1 is clicked, its ID is stored an passed to page 2 (somehow). On page load, page 2 will check the ID that was passed to it, and will open all children rows with the same ID... I may be completely wrong, but if anyone has any suggestions/can tell me how to do this, that would be great. My code for the FAQ page with the collapsable/expandable tables is bellow:
 
JS:
  1. <<script type="text/javascript" src="page_support/jquery.js"></script>
  2. <<script type="text/javascript">
  3. <$(document).ready(function() {
  4. var toggleMinus = 'page_support/bullet_toggle_minus.png'
  5. var togglePlus = 'page_support/bullet_toggle_plus.png'
  6. var $subHead = $('tbody th:first-child')
  7. $subHead.prepend('<img src="' + toggleMinus + '"alt="Click to expand/collapse" />')
  8. $('img', $subHead).addClass('clickable')
  9. .click(function() {
  10. var toggleSrc = $(this).attr('src')
  11. if ( toggleSrc == toggleMinus ) {
  12. $(this).attr('src', togglePlus)
  13. .parents('tr').siblings().fadeOut('fast')
  14. } else{
  15. $(this).attr('src', toggleMinus)
  16. .parents('tr').siblings().fadeIn('fast')
  17. }
  18. })
  19. })
  20. </script>
  21. THANKS :D