jqTree question
jqTree question
Hi! I'm just fumbling along trying to make sense of jQTree by mbraak. There s an example page on github which I am trying to follow. (http://mbraak.github.io/jqTree/ ) I copyied and pasted the code in the header: (I'm sorry I can't figure out this ******* Editor!
********************************************************************************
CODE:
<meta charset="utf-8">
<title>jqTree</title>
<link rel="stylesheet" href="extra/css/gridless.css">
<link rel="stylesheet" href="extra/prism/prism.css">
<link rel="stylesheet" href="jqtree.css">
<link rel="stylesheet" href="extra/css/documentation.css">
<link href='http://fonts.googleapis.com/css?family=Corben:bold&v1' rel='stylesheet' type='text/css'>
<script src="extra/js/jquery-1.9.1.min.js"></script>
<script src="extra/prism/prism.js"></script>
<script src="tree.jquery.js"></script>
CODE END
***************************************************************************************
I copied and pasted creating the tree:
***************************************************************************************
CODE
<script>
var data = [
{
label: 'node1',
children: [
{ label: 'child1' },
{ label: 'child2' }
]
},
{
label: 'node2',
children: [
{ label: 'child3' }
]
}
];
</script>
CODE END
*****************************************************************************************
And Calling the tree:
*****************************************************************************************
CODE
<script>
$(function() {
$('#tree1').tree({
data: data
});
});
</script>
CODE END
*****************************************************************************************
Ok that was lot of work for what was my original tree question, which was: Is the prism.js needed for just a tree in my website? Also: How am I doing so far? It's just a skeleton and I may have to c&P more code, but am going in the right direction. The reason for the tree is to make a family tree with the remote ancestor at the top.
Thanks very much for your replies and suggestions!
Paul