-
Notifications
You must be signed in to change notification settings - Fork 9
/
demo.html
50 lines (50 loc) · 1.5 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
<!DOCTYPE html>
<html>
<head>
<title>Keypad Demo</title>
<link rel="stylesheet" type="text/css" href="jquery.keypad.css">
<style type="text/css">
body {
width: 600px;
height: 800px;
}
#keypad {
margin: 0 auto;
width: 420px;
height: 560px;
}
input {
color: black;
background: white;
text-align: center;
margin: 70px auto 40px;
font-size: 3em;
display: block;
width: 400px;
border-radius: 6px;
border: 2px solid black;
}
</style>
</head>
<body>
<form>
<input type="password" class="keypad" disabled="disabled" />
</form>
<div id="keypad"></div>
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="//rawgit.com/visionect/koalalib/master/jquery.trackmanipulation.js"></script>
<script type="text/javascript" src="jquery.keypad.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#keypad').keypad();
$('input').change(function() {
$(this).tmList({bitDepth: 1, A2: true}); // trigger fast redraw for visionect tablet
});
$('form').submit(function(e) {
e.preventDefault();
console.log($('input.keypad').val());
});
});
</script>
</body>
</html>