My favorites
▼
|
Sign in
dynatree
Dynatree is a JavaScript dynamic tree view plugin for jQuery with support for persistence, keyboard, checkboxes, drag'n'drop, and lazy loading.
Project Home
Downloads
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
44
attachment: TestDynaTree.js
(1.1 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$(document).ready(function(){
// Attach the dynatree widget to an existing <div id="tree"> element
// and pass the tree options as an argument to the dynatree() function:
$("#tree").dynatree({
title: "Company Name",
rootVisible: true,
imagePath: "Images/dynatree-skin/",
onSelect: function(dtnode) {
// A DynaTreeNode object is passed to the select handler
alert("You selected " + dtnode.data.key);
},
children: [ // Pass an array of nodes.
{title: "Branch 1", isFolder: true, key: "BR00001",
children: [
{title: "Department 1", isFolder: true, key: "DEPT00001",
children: [
{title: "John Doe", key: "EMP00001"},
{title: "Joe Sixpack", key: "EMP00002"}
]
},
{title: "Department 2", isFolder: true, key: "DEPT00002",
children: [
{title: "Tadhg an Mhargaidh", key: "EMP00003"}
]
}
]
}
]
});
});
Powered by
Google Project Hosting