jQuery Treetable

Take a plain html table, wrap the rows you want collapsing/expanding in a tbody with an id of treetable, map each row to it's parent row, set some options, and let jQTreeTable take it from there.
By wrapping it in a tbody, it means you can have other rows within the same table not part of the tree, and it also means that if javascript is disabled, users still get the plain table.
You can set which column takes the treeview effect, and you can also set which parents are collapsed initially. To do this, it must be done with an array, even if there is only one node you want collapsed.
A highlight option can be set so that rows change colour as they are hovered over. There is dynamic striping of the rows, and there is also a custom onselect event which fires on the table cells, that can be handled with a callback function (watch the status bar when you click on a cell). Links within the cells still work as expected.
I took the graphics files from Jörn Zaefferer's site, and adapted them for my purposes. I hope he doesn't mind.
Sorry I've nowhere to put comments as yet, but I will be keeping a close eye on the jquery-en list, so any feedback/bug finds would be appreciated.
By the way, if you use the script off this page, make sure to remove the part of the script written for this page (just one line). Alternatively, you can download the zipped file here. It includes this php page with it's random treetable generator.

var options = {openImg: "tv-collapsable.gif", shutImg: "tv-expandable.gif", leafImg: "tv-item.gif", lastOpenImg: "tv-collapsable-last.gif", lastShutImg: "tv-expandable-last.gif", lastLeafImg: "tv-item-last.gif", vertLineImg: "vertline.gif", blankImg: "blank.gif", collapse: false, column: 1, striped: true, highlight: true, onselect: function(target){window.status = "You clicked "+target.html();}};
Map Array for the table below is :
[0, 1, 2, 2, 2, 2, 6, 1, 8, 9, 0, 0, 12, 0, 14, 15, 15, 0, 0, 19, 0, 21, 22, 22, 24, 0, 0, 0, 0, 0, 0, 0, 32, 33, 34, 33, 33, 37, 38, 33, 33, 41, 41, 33, 0, 0, 46, 46, 46, 49]

Row NoDescriptionPath to RowLevelStatus
Row NoDescriptionPath to RowLevelStatus
1Child of 0(Root)[0, 1]1
2Child of 1[0, 1, 2] 2
3Child of 2[0, 1, 2, 3] 3
4Child of 2[0, 1, 2, 4] 3
5Child of 2[0, 1, 2, 5] 3
6Child of 2[0, 1, 2, 6] 3
7Child of 6[0, 1, 2, 6, 7] 4
8Child of 1[0, 1, 8] 2
9Child of 8[0, 1, 8, 9] 3
10Child of 9[0, 1, 8, 9, 10] 4
11Child of 0[0, 11] 1
12Child of 0[0, 12] 1
13Child of 12[0, 12, 13] 2
14Child of 0[0, 14] 1
15Child of 14[0, 14, 15] 2
16Child of 15[0, 14, 15, 16] 3
17Child of 15[0, 14, 15, 17] 3
18Child of 0[0, 18] 1
19Child of 0[0, 19] 1
20Child of 19[0, 19, 20] 2
21Child of 0[0, 21] 1
22Child of 21[0, 21, 22] 2
23Child of 22[0, 21, 22, 23] 3
24Child of 22[0, 21, 22, 24] 3
25Child of 24[0, 21, 22, 24, 25] 4
26Child of 0[0, 26] 1
27Child of 0[0, 27] 1
28Child of 0[0, 28] 1
29Child of 0[0, 29] 1
30Child of 0[0, 30] 1
31Child of 0[0, 31] 1
32Child of 0[0, 32] 1
33Child of 32[0, 32, 33] 2
34Child of 33[0, 32, 33, 34] 3
35Child of 34[0, 32, 33, 34, 35] 4
36Child of 33[0, 32, 33, 36] 3
37Child of 33[0, 32, 33, 37] 3
38Child of 37[0, 32, 33, 37, 38] 4
39Child of 38[0, 32, 33, 37, 38, 39] 5
40Child of 33[0, 32, 33, 40] 3
41Child of 33[0, 32, 33, 41] 3
42Child of 41[0, 32, 33, 41, 42] 4
43Child of 41[0, 32, 33, 41, 43] 4
44Child of 33[0, 32, 33, 44] 3
45Child of 0[0, 45] 1
46Child of 0[0, 46] 1
47Child of 46[0, 46, 47] 2
48Child of 46[0, 46, 48] 2
49Child of 46[0, 46, 49] 2
50Child of 49[0, 46, 49, 50] 3
Randomdataoutsidetreetabletbody

Featured on:-