-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
68 lines (66 loc) · 2.17 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
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<link href="jquery.qtree.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="qtree"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="jquery.qtree.js"></script>
<script>
var data = {
"question": "This is the first question, right?",
"default": "Please choose",
"choices": [
{
"choice": "Sure is!",
"question": {
"question": "Do you want another question?",
"default": "Please choose",
"choices": [
{
"choice": "Sure Do!",
"question": {
"question": "Here it goes. Is it the last question?",
"choices": [
{
"choice": "Guess it is",
"answer": "Spot on!"
},
{
"choice": "I think there is another one",
"answer": "No, you were wrong. No other question for you my friend."
}
]
}
}
]
}
},
{
"choice": "NO",
"question": {
"question": "You know, it was the first question, right?",
"default": "Please choose",
"choices": [
{
"choice": "Yes sure...",
"answer": "Okay, fair enough..."
}
]
}
},
{
"choice": "Maybe",
"answer": "Not very decisive are you?"
}
]
}
$(function(){
$('#qtree').qtree({data: data});
});
</script>
</body>
</html>