forked from simpleweb/jQuery-Tokenizing-Autocomplete-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 3
/
demo.html
53 lines (45 loc) · 1.93 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
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script type="text/javascript" src="src/jquery.tokeninput.js"></script>
<link rel="stylesheet" href="styles/token-input.css" type="text/css" />
<link rel="stylesheet" href="styles/token-input-facebook.css" type="text/css" />
<script type="text/javascript">
$(document).ready(function() {
$("#tokenize").tokenInput("http://loopj.com/tokeninput/tvshows.php", {
hintText: "Type in the names of your favorite TV shows",
noResultsText: "No results",
searchingText: "Searching...",
requiresMatch: false,
suggestedTags: [{id: 'tag1', name: 'tag1', size: 1}, {id: 'tag2', name: 'tag2', size: 2}],
focusHint: false
});
$("#tokenize2").tokenInput("/tokeninput/tvshows.php", {
classes: {
tokenList: "token-input-list-facebook",
token: "token-input-token-facebook",
tokenDelete: "token-input-delete-token-facebook",
selectedToken: "token-input-selected-token-facebook",
highlightedToken: "token-input-highlighted-token-facebook",
dropdown: "token-input-dropdown-facebook",
dropdownItem: "token-input-dropdown-item-facebook",
dropdownItem2: "token-input-dropdown-item2-facebook",
selectedDropdownItem: "token-input-selected-dropdown-item-facebook",
inputToken: "token-input-input-token-facebook"
}
});
});
</script>
</head>
<body>
<h1>Jquery Tokenizing Autocomplete Input</h1>
<div>
<h2>List style</h2>
<input type="text" id="tokenize" name="blah" />
</div>
<div style="clear:left">
<h2>Facebook style</h2>
<input type="text" id="tokenize2" name="blah2" />
</div>
</body>
</html>