forked from ftlabs/fastclick
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path30.html
More file actions
33 lines (33 loc) · 1.12 KB
/
30.html
File metadata and controls
33 lines (33 loc) · 1.12 KB
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<style type="text/css">
p, label { font-family: sans-serif; }
label { display: inline-block; background: silver; padding: 0 1em; line-height: 2em; }
.test { margin: 2em 0; }
</style>
<title>#30</title>
<script type="application/javascript" src="../lib/fastclick.js"></script>
<script type="application/javascript">
window.addEventListener('load', function() {
new FastClick(document.body);
}, false);
</script>
</head>
<body>
<p>FastClick is instantiated on the document body. Tap a label for the associated input control to gain focus. Focus should be equally fast in all tests.</p>
<div class="test">
<label><input type="text"> Descendant association</label>
</div>
<div class="test">
<input type="text" id="test-text"> <label for="test-text">Attribute association</label>
</div>
<div class="test">
<label><input type="checkbox"> Descendant association</label>
</div>
<div class="test">
<input type="checkbox" id="test-checkbox"> <label for="test-checkbox">Attribute association</label>
</div>
</body>
</html>