forked from maxwells/bootstrap-tags
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo-3.html
74 lines (70 loc) · 2.7 KB
/
demo-3.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
<!DOCTYPE html>
<html>
<head>
<title>
Tag Demo
</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src='dist/js/bootstrap-tags.js'></script>
<link rel="stylesheet" type="text/css" href="dist/css/bootstrap-tags.css" />
</head>
<body>
<div class="container">
<h3>Bootstrap 3.0.3</h3>
<p>Small</p>
<div id="small"></div>
<p>Large</p>
<div id="large"></div>
<p>Medium</p>
<div id="medium"></div>
<p>maxNumTags = 3</p>
<div id="maxNumTags"></div>
<p>suggestOnClick</p>
<div id="suggestOnClick"></div>
<p>caseInsensitive</p>
<div id="caseInsensitive"></div>
<p>readOnly</p>
<div id="readOnly"></div>
<script>
$(function(){
$("#small").tags({
tagSize: "sm",
suggestions: ["alpha", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel", "india"],
tagData: ["juliett", "kilo"]
});
$("#large").tags({
tagSize: "lg",
suggestions: ["alpha", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel", "india"],
tagData: ["juliett", "kilo"]
});
$("#medium").tags({
suggestions: ["alpha", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel", "india"],
tagData: ["juliett", "kilo"]
});
$("#readOnly").tags({
readOnly: true,
tagData: ["juliett", "kilo"]
});
$("#suggestOnClick").tags({
restrictTo: ["alpha", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel", "india"],
suggestions: ["alpha", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel", "india"],
promptText: "Click here to add new tags",
suggestOnClick: true
});
$("#caseInsensitive").tags({
suggestions: ["Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India"],
tagData: ["india", "juliett"],
caseInsensitive: true
});
$("#maxNumTags").tags({
suggestions: ["alpha", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel", "india"],
tagData: ["alpha", "bravo", "charlie"],
maxNumTags: 3
});
});
</script>
</div>
</body>
</html>