You can simply show and hide by changing style.display property. By calling below javascript function from the header row of your table, you can make your table collapsible.
an example of creating object in javascript,taken from http://www.wdvl.com/Authoring/JavaScript/Tutorial/objects.htmldirect instance of an objectDespite the awkward sound name, a "direct instance of an object" simply means creating a new single object, suc...