-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
107 lines (94 loc) · 1.75 KB
/
test.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!doctype html>
<html>
<head>
<title>
keynav Demo
</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
<style>
.focused { background-color: lightgreen; }
.homelink { text-align: center; }
</style>
<script src="jquery-1.4.4.min.js" ></script>
<script src="jquery.keynav.js" ></script>
<script>
$(function() {
$(".keynav").keynav()
.bind("focus", function() {
$(this).find(":input,a:first").get(0).focus();
});
$(".keynav:last").keynav("activate");
});
</script>
</head>
<body>
<div class="page">
<div id="header">
<h1>
keynav demo
</h1>
</div>
</div>
<div id="main">
<p class="homelink">
For more details about jQuery keynav, see <a href="http://google.com">http://google.com</a>
</p>
<div style="width:300px;">
<table class="grid">
<tr>
<th>
Element
</th>
<th>
Description
</th>
</tr>
<tr class="keynav">
<td>
<a href="#">Link</a>
</td>
<td>
a href
</td>
</tr>
<tr class="keynav">
<td>
<select>
<option selected>Choose</option>
<option>Option 1</option>
<option>Option 2</option>
</select>
</td>
<td>
select
</td>
</tr>
<tr class="keynav">
<td>
<textarea rows="4" cols="25">Line of text
Another line of text</textarea>
</td>
<td>
textarea
</td>
</tr>
<tr class="keynav">
<td>
<input type="text" />
</td>
<td>
textbox
</td>
</tr>
</table>
<div class="keynav" style="text-align:center">
<button>Button</button>
in a div
</div>
</div>
<br />
<em>press the UP and DOWN arrow keys to navigate</em>
</div>
</div>
</body>
</html>