-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsondemo.html
executable file
·45 lines (41 loc) · 1.51 KB
/
jsondemo.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<html>
<head>
<title>Use jsTree</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="jquery.js">
</script>
<script src="jquery.jstree.js">
</script>
<script>
$(document).ready(function(){
$("#treeViewDiv").jstree({
"json_data" : {
"data":[
{
"data" : "Search engines",
"children" :[
{"data":"Yahoo"},
{"data":"Bing"},
{"data":"Google", "children":[{"data":"Youtube"},{"data":"Gmail"},{"data":"Orkut"}]}
]
},
{
"data" : "Networking sites",
"children" :[
{"data":"Facebook"},
{"data":"Twitter"}
]
}
]
},
"plugins" : [ "themes", "json_data", "ui" ]
});
});
</script>
</head>
<body>
<div id="treeViewDiv">
</div>
<script src="dist/jstree.min.js"></script>
</body>
</html>