I am using a Jquery plugin, treeTable for displaying a html table. http://ludo.cubicphuse.nl/jquery-plugins/treeTable/doc/ My code is below :
<html>
<head>
<link href="treeTable/src/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="treeTable/src/javascripts/jquery.treeTable.js"></script>
<script type="text/javascript" src="treeTable/doc/javascripts/jquery.js"></script>
<script type="text/javascript" src="treeTable/doc/javascripts/jquery.ui.js"></script>
<script>
$(document).ready(function() {
$('.type_struct_class').treeTable({
initialState: 'collapsed'
});
$('table#type_struct tbody tr').mousedown(function() {
$('tr.selected').removeClass('selected');
$(this).addClass('selected');
});
$(\"table#type_struct tbody tr span\").mousedown(function() {
$($(this).parents(\"tr\")[0]).trigger(\"mousedown\");
});
});
</script>
</head>
<body>
<table class='type_struct_class' id='type_struct'>
<tr id="node-1">
<td>Parent</td><td>100</td><td>1000</td>
</tr>
<tr id="node-2" class="child-of-node-1">
<td>Child</td><td>200</td><td>2000</td>
</tr>
<tr id="node-3" class="child-of-node-2">
<td>Child</td><td>300</td><td>3000</td>
</tr>
</table>
</body>
</html>
I don't see the table formatted, as like with child and parent nodes. It appears as a normal table in my Chrome browser. Can anyone help where I went wrong?