forked from mbraak/jqTree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
112 lines (111 loc) · 2.22 KB
/
demo.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jqTree</title>
<link rel="stylesheet" href="extra/css/gridless.css">
<link rel="stylesheet" href="jqtree.css">
<script src="extra/js/jquery-1.7.1.min.js"></script>
<script src="extra/js/jquery-ui1.9m5.min.js"></script>
<script src="tree.jquery.js"></script>
<style>
#page {
width: 960px;
margin: 0 auto;
}
#tree1 {
width: 300px;
margin-bottom: 8px;
border: solid 1px #ccc;
}
h1 {
font-size: 1.625em;
}
</style>
</head>
<body>
<div id="page">
<h1>Dinosaur family tree</h1>
<div id="tree1"></div>
<script>
$(function() {
var data = [
{
label: 'Saurischia',
children: [
{label: 'Herrerasaurians'},
{
label: 'Theropods',
children: [
{label: 'Coelophysoids'},
{label: 'Ceratosaurians'},
{label: 'Spinosauroids'},
{label: 'Carnosaurians'},
{
label: 'Coelurosaurians',
children: [
{label: 'Tyrannosauroids'},
{label: 'Ornithomimosaurians'},
{label: 'Therizinosauroids'},
{label: 'Oviraptorosaurians'},
{label: 'Dromaeosaurids'},
{label: 'Troodontids'},
{label: 'Avialans'}
]
}
]
},
{
label: 'Sauropodomorphs',
children: [
{label: 'Prosauropods'},
{
label: 'Sauropods',
children: [
{label: 'Diplodocoids'},
{
label: 'Macronarians',
children: [
{label: 'Brachiosaurids'},
{label: 'Titanosaurians'}
]
}
]
}
]
}
]
},
{
label: 'Ornithischians',
children: [
{label: 'Heterodontosaurids'},
{
label: 'Thyreophorans',
children: [
{label: 'Ankylosaurians'},
{label: 'Stegosaurians'}
]
},
{
label: 'Ornithopods',
children: [
{label: 'Hadrosaurids'}
]
},
{label: 'Pachycephalosaurians'},
{label: 'Ceratopsians'}
]
}
];
$('#tree1').tree({
data: data,
autoOpen: 0,
dragAndDrop: true,
selectable: true
});
});
</script>
</div>
</body>
</html>