-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
62 lines (55 loc) · 1.98 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
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Key Candy Test</title>
<style type="text/css">
body {
background: #DDD;
}
</style>
<link rel="stylesheet" type="text/css" href="keyCandy.css"/>
</head>
<body data-kchint="">
<h1>Key Candy Demo Page</h1>
<form>
<p>Press the Command key on Mac Os or the CTRL key on Windows or Linux to
make the accesskey tooltips appear. Then press one to see what happens</p>
<p>
<a id="hash_link" href="#" accesskey="A">A Link</a>
</p>
<p>
<a id="google_link" href="http://google.com" accesskey="G">A Link to Google</a>
</p>
<p>
<button id="the_button" type="button" accesskey="B">A Button</button>
</p>
<p>
<label accesskey="C" for="text_input">A text input</label>
<input id="text_input" name="text_input" type="text"/>
</p>
<p><label accesskey="H" for="check_it">A Checkbox: <input id="check_it" type="checkbox"/></label></p>
<p><label for="comment" accesskey="T">A Textarea</label><textarea id="comment" name="textarea_comment"></textarea></p>
<p><label for="submit" accesskey="U">A Submit Input</label><input type="submit" id="submit" value="Submit"/></p>
<p><label for="choices" accesskey="S">Choose one: </label>
<select id="choices" name="select_choices">
<option>First</option>
<option>Second</option>
</select>
</p>
</form>
<script type="text/javascript" src="lib/keyCandy.standalone.js"></script>
<script type="text/javascript">
(function($){
var click_handler = function(e) {
alert('You clicked an \'' + this.tagName + '\' with ID \'' + $(this).attr('id'));
e.preventDefault();
};
KeyCandy.init();
$('#hash_link').bind('click', click_handler);
$('input[type="submit"]').bind('click', click_handler);
$('button').bind('click', click_handler);
})(KEYCANDY_DOM_LIB);
</script>
</body>
</html>