-
Notifications
You must be signed in to change notification settings - Fork 23
Usage
rafaelthca edited this page Aug 31, 2015
·
1 revision
This page provides a sequence of steps to use the Treeview component.
- Include the component .js and .css files.
<script src="lib/Aimara.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/Aimara.css">- Create the div tag where the tree will be rendered.
<div id="div_tree"></div>- Instantiate the tree, create some nodes, child nodes and render it. Nodes can be added before and after the tree was rendered.
<script type="text/javascript">
window.onload = function() {
var tree = createTree('div_tree','white');
var node1 = tree.createNode('First node',false,'images/star.png',null,null,null);
node1.createChildNode('First child node', false, 'images/blue_key.png',null,null);
tree.drawTree();
node1 = tree.createNode('Second node',false,'images/star.png',null,null,null);
node1.createChildNode('Second child node', false, 'images/blue_key.png',null,null);
};
</script>