forked from loopj/jquery-tokeninput
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_tabindex.html
53 lines (47 loc) · 1.89 KB
/
demo_tabindex.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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/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() {
$("input[type=button]").click(function () {
alert("Would submit: " + $(this).siblings("input[type=text]").val());
});
});
</script>
</head>
<body>
<h1>jQuery Tokeninput Demos</h1>
<h2>Tab index demo</h2>
<div>
<input type="text" tabindex="1" value="index 1"/>
<input type="text" tabindex="2" value="index 2" />
<input type="text" id="demo-input1" name="blah" tabindex="3" />
<input type="text" tabindex="4" value="index 4" />
<input type="button" value="Submit" tabindex="5" />
<script type="text/javascript">
$(document).ready(function() {
$("#demo-input1").tokenInput("http://shell.loopj.com/tokeninput/tvshows.php");
});
</script>
</div>
<h2>Tab index demo in a form</h2>
<div>
<form>
<input type="text" tabindex="6" value="index 6"/>
<input type="text" tabindex="7" value="index 7" />
<input type="text" id="demo-input2" name="blah" tabindex="8" />
<input type="text" tabindex="9" value="index 9" />
<input type="button" value="Submit" tabindex="10" />
</form>
<script type="text/javascript">
$(document).ready(function() {
$("#demo-input2").tokenInput("http://shell.loopj.com/tokeninput/tvshows.php");
});
</script>
</div>
</body>
</html>