Repository navigation
Expand file tree
/
Copy pathdemo.html
More file actions
101 lines (88 loc) · 3.06 KB
/
Copy pathdemo.html
File metadata and controls
101 lines (88 loc) · 3.06 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
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
<html>
<head>
<title>FLAPPER DEMO</title>
<link href="css/flapper.css" type="text/css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="transform/dist/jquery.transform-0.9.3.min.js"></script>
<script src="src/jquery.flapper.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var opts = {
chars_preset: 'alphanum',
align: 'left',
width: 22
};
var $displays = $('input.display');
var num = $displays.length;
$displays.flapper(opts);
var strings = [];
$displays.each(function(){
strings.push('');
});
var cursor = 0;
$('input.typesomething').keypress(function(event){
if (event.charCode == 13) {
var txt = $(this).val().toUpperCase();
strings[cursor] = txt;
cursor++;
if (cursor > num-1) {
cursor = 0;
}
$displays.each(function(i) {
$(this).val(strings[i]).change();
$('input.typesomething').val('');
});
}
});
});
</script>
<style type="text/css">
body {
font-family: Roboto Condensed;
color: #333;
}
.page {
width: 1000px;
margin: 30px auto 0;
}
h1 {
text-align: center;
font-size: 64px;
}
.displays {
}
.flapper {
margin-bottom: 2px;
text-align: center;
}
.inputarea {
margin: 24px 0;
}
input.typesomething {
font-family: Roboto Condensed;
font-size: 24px;
width: 500px;
padding: 14px;
border: 0;
background-color: #EEE;
color: #333;
}
</style>
</head>
<body>
<div class="page">
<h1>FLAPPER DEMO</h1>
<div class="displays">
<input class="display M" />
<input class="display M" />
<input class="display M" />
<input class="display M" />
<input class="display M" />
<input class="display M" />
</div>
<div class="inputarea">
<input class="typesomething" placeholder="Type Something + <ENTER>" maxlength="22" />
</div>
</div>
</body>
</html>