You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
656 B
25 lines
656 B
5 years ago
|
$(document).ready(function(){
|
||
|
var list = [ 4, 2 , 1, 3 ]
|
||
|
var index = 0
|
||
|
var machine = $("#machine4").slotMachine({
|
||
|
active : 0,
|
||
|
delay : 500,
|
||
|
randomize : function(activeElementIndex){
|
||
|
return list[index];
|
||
|
}
|
||
|
});
|
||
|
|
||
|
$("#slotMachineButtonShuffle").click(function(){
|
||
|
machine.shuffle();
|
||
|
$("#slotMachineButtonShuffle").addClass("xxx");
|
||
|
setTimeout(() => {
|
||
|
index ++
|
||
|
machine.stop();
|
||
|
$("#slotMachineButtonShuffle").removeClass("xxx");
|
||
|
}, 1000);
|
||
|
});
|
||
|
|
||
|
// $("#slotMachineButtonStop").click(function(){
|
||
|
|
||
|
// });
|
||
|
});
|