-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
84 lines (79 loc) · 1.48 KB
/
index.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
<!DOCTYPE>
<head>
<title>jquery多级树型标签</title>
<link rel="stylesheet" type="text/css" href="css/tagTree.css" />
<link rel="stylesheet" type="text/css" href="css/font-awesome.css" />
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="js/tagTree.js"></script>
<script type="text/javascript">
$(function(){
var data =[
{
name:"1号标签",
value:"1",
children:[
{
name:"11号标签",
value:"11",
children:[]
},
{
name:"12号标签",
value:"12",
children:[]
},
{
name:"13号标签",
value:"13",
children:[
{
name:"131号标签",
value:"131",
children:[]
}
]
}
]
},
{
name:"2号标签",
value:"2",
children:[
{
name:"21号标签",
value:"21",
children:[]
},
{
name:"22号标签",
value:"22",
children:[]
}
]
},
{
name:"3号标签",
value:"3",
children:[]
}
];
$("#test").tagTree({
id:"",
data:data,
fold:false,
multiple:false,
check:function(val){
console.log('chekc:'+val);
console.log($(this).tagTreeValues());
},
done:function(){
console.log('tagTree is ok!');
}
});
});
</script>
</head>
<body>
<div id="test"></div>
</body>
</html>