-
Notifications
You must be signed in to change notification settings - Fork 0
/
quayso.html
331 lines (288 loc) · 8.48 KB
/
quayso.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jSlots Slot Machine - Matthew Lein</title>
<link href='http://fonts.googleapis.com/css?family=Gravitas+One&text=1234567' rel='stylesheet' type='text/css'>
<!-- Syntax highlighting, ignore this -->
<link rel="stylesheet" href="SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" media="screen" title="no title" charset="utf-8">
<style type="text/css">
ul {
padding: 0;
margin: 0;
list-style: none;
}
.jSlots-wrapper {
overflow: hidden;
height: 20px;
display: inline-block; /* to size correctly, can use float too, or width*/
border: 1px solid #999;
}
.slot {
float: left;
}
input[type="button"] {
display: block;
}
/* ---------------------------------------------------------------------
FANCY EXAMPLE
--------------------------------------------------------------------- */
.fancy .jSlots-wrapper {
overflow: hidden;
height: 100px;
display: inline-block; /* to size correctly, can use float too, or width*/
border: 1px solid #999;
transform: scale(2);
}
.fancy .slot li {
width: 100px;
line-height: 100px;
text-align: center;
font-size: 70px;
font-weight: bold;
color: #fff;
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
font-family: 'Gravitas One', serif;
border-left: 1px solid #999;
}
.fancy .slot:first-child li {
border-left: none;
}
.fancy .slot li:nth-child(7) {
background-color: #FFCE29;
}
.fancy .slot li:nth-child(6) {
background-color: #FFA22B;
}
.fancy .slot li:nth-child(5) {
background-color: #FF8645;
}
.fancy .slot li:nth-child(4) {
background-color: #FF6D3F;
}
.fancy .slot li:nth-child(3) {
background-color: #FF494C;
}
.fancy .slot li:nth-child(2) {
background-color: #FF3333;
}
.fancy .slot li:nth-child(1),
.fancy .slot li:nth-child(8) {
background-color: #FF0000;
}
.fancy .slot li span {
display: block;
}
/* ---------------------------------------------------------------------
ANIMATIONS
--------------------------------------------------------------------- */
@-webkit-keyframes winner {
0%, 50%, 100% {
-webkit-transform: rotate(0deg);
font-size:70px;
color: #fff;
}
25% {
-webkit-transform: rotate(20deg);
font-size:90px;
color: #FF16D8;
}
75% {
-webkit-transform: rotate(-20deg);
font-size:90px;
color: #FF16D8;
}
}
@-moz-keyframes winner {
0%, 50%, 100% {
-moz-transform: rotate(0deg);
font-size:70px;
color: #fff;
}
25% {
-moz-transform: rotate(20deg);
font-size:90px;
color: #FF16D8;
}
75% {
-moz-transform: rotate(-20deg);
font-size:90px;
color: #FF16D8;
}
}
@-ms-keyframes winner {
0%, 50%, 100% {
-ms-transform: rotate(0deg);
font-size:70px;
color: #fff;
}
25% {
-ms-transform: rotate(20deg);
font-size:90px;
color: #FF16D8;
}
75% {
-ms-transform: rotate(-20deg);
font-size:90px;
color: #FF16D8;
}
}
@-webkit-keyframes winnerBox {
0%, 50%, 100% {
box-shadow: inset 0 0 0px yellow;
background-color: #FF0000;
}
25%, 75% {
box-shadow: inset 0 0 30px yellow;
background-color: aqua;
}
}
@-moz-keyframes winnerBox {
0%, 50%, 100% {
box-shadow: inset 0 0 0px yellow;
background-color: #FF0000;
}
25%, 75% {
box-shadow: inset 0 0 30px yellow;
background-color: aqua;
}
}
@-ms-keyframes winnerBox {
0%, 50%, 100% {
box-shadow: inset 0 0 0px yellow;
background-color: #FF0000;
}
25%, 75% {
box-shadow: inset 0 0 30px yellow;
background-color: aqua;
}
}
.winner li {
-webkit-animation: winnerBox 2s infinite linear;
-moz-animation: winnerBox 2s infinite linear;
-ms-animation: winnerBox 2s infinite linear;
}
.winner li span {
-webkit-animation: winner 2s infinite linear;
-moz-animation: winner 2s infinite linear;
-ms-animation: winner 2s infinite linear;
}
/* Syntax Highlighter, ignore */
.dp-highlighter ol {
padding: 10px;
}
#playFancy{
position: absolute;
margin-top: 88px;
left: 35%;
padding:10px 20px;
background: #014a81;
color:#fff;
text-decoration: none;
}
#wrapper{
background: url('bg.jpg') no-repeat;
background-size: cover;
background-position: center center;
position: relative;
width: 1366px;
height: 630px;
}
#content{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.bg img{
width: 100%;
height: 100%;
}
.bg{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
z-index:-1;
}
</style>
</head>
<body>
<div class="bg"><img src="bg.jpg" /></div>
<div id="wrapper">
<div id="content">
<div class="fancy">
<ul class="slot">
<!-- In reverse order so the 7s show on load -->
<!-- <li><span>7</span></li>
<li><span>6</span></li> -->
<li><span>1</span></li>
<li><span>2</span></li>
<li><span>3</span></li>
<li><span>4</span></li>
<li><span>5</span></li>
</ul>
</div>
<a id="playFancy" href="#">Quay số</a>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="jquery.easing.1.3.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.jSlots.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(document).keypress(function(event){
var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == '13'){
$('#playFancy').click();
}
});
// fancy example
$('.fancy .slot').jSlots({
number : 3,
winnerNumber : [1,2,3,4,5],
spinner : '#playFancy',
easing : 'easeOutSine',
time : 7000,
loops : 6,
onStart : function() {
$('.slot').removeClass('winner');
},
onEnd : function(finalNumbers) {
console.log(finalNumbers);
var FirstNumber = finalNumbers[0];
console.log(FirstNumber);
// react to the # of winning slots
// if ( winCount === 1 ) {
// alert('You got ' + winCount);
// } else if ( winCount > 1 ) {
// // alert('You got ' + winCount + ' 7’s!!!');
// }
},
onWin : function(winCount, winners, finalNumbers) {
// only fires if you win
$.each(winners, function() {
this.addClass('winner');
});
// react to the # of winning slots
// if ( winCount === 1 ) {
// alert('You got ' + winCount);
// } else if ( winCount > 1 ) {
// // alert('You got ' + winCount + ' 7’s!!!');
// }
}
});
</script>
<!-- Syntax highlighting, ignore this -->
<script src="SyntaxHighlighter/Scripts/shCore.js" type="text/javascript" charset="utf-8"></script>
<script src="SyntaxHighlighter/Scripts/shBrushCss.js" type="text/javascript" charset="utf-8"></script>
<script src="SyntaxHighlighter/Scripts/shBrushJScript.js" type="text/javascript" charset="utf-8"></script>
<script src="SyntaxHighlighter/Scripts/shBrushXml.js" type="text/javascript" charset="utf-8"></script>
<script language="javascript">
dp.SyntaxHighlighter.ClipboardSwf = '/flash/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code', false, false )//, [collapseAll], [firstLine], [showColumns] );
//HighlightAll(name, [showGutter], [showControls], [collapseAll], [firstLine], [showColumns])
</script>
<!-- /Syntax highlighting -->
</body>
</html>