$('#btn-example1').click(function() {
$('#example1 ul').playSpin();
});
$('#btn-example2').click(function() {
$('#example2 ul').playSpin({
endNum: [7, 7, 7],
});
});
$('#btn-example3').click(function() {
$('#example3 ul').playSpin({
stopSeq: 'leftToRight', // rightToLeft
});
});
$('#btn-example4').click(function() {
$('#example4 ul').playSpin({
easing: 'easeOutBack',
});
});
$('#btn-example5').click(function() {
$('#example5 ul').playSpin({
time: 1000,
});
});
$('#btn-example6').click(function() {
$('#example6 ul').playSpin({});
});
$('#btn-example7').click(function() {
$('#lbl-example7-1').text('');
$('#lbl-example7-2').text('');
$('#example7 ul').playSpin({
onEnd: function(num) {
$('#lbl-example7-1').text($('#lbl-example7-1').text() + num.toString());
},
onFinish: function(num) {
$('#lbl-example7-2').text(num);
}
});
});
$('#btn-example8').click(function() {
sound.play(); // Start play the sound after click button
$('#example8 ul').playSpin({
time: 2000,
endNum: [1, 2, 7],
stopSeq: 'rightToLeft',
onEnd: function() {
ding.play(); // Play ding after each number is stopped
},
onFinish: function() {
sound.pause(); // To stop the looping sound is pause it
}
});
});
$('#btn-example9-start').click(function() {
$('#example9 ul').playSpin({
manualStop: true
});
});
$('#btn-example9-stop').click(function() {
$('#example9 ul').stopSpin();
});
var numKeeptrack = 0;
$('#btn-example10-start').click(function() {
numKeeptrack = 3;
$('#example10 #first').playSpin({
manualStop: true
});
$('#example10 #second').playSpin({
manualStop: true
});
$('#example10 #third').playSpin({
manualStop: true
});
});
$('#btn-example10-stop').click(function() {
if (numKeeptrack == 3) {
$('#example10 #third').stopSpin();
} else if (numKeeptrack == 2) {
$('#example10 #second').stopSpin();
} else if (numKeeptrack == 1) {
$('#example10 #first').stopSpin();
}
numKeeptrack--;
});
$('#btn-example11-start').click(function() {
$('#example11 ul').playSpin({
time: $('#txt-example11-time').val(),
useStopTime: true,
stopTime: $('#txt-example11-stoptime').val(),
});
});
$('#btn-click').click(function() {
$.ajax({
url: // url
data: // pass data or leave it
})
.done(function(numbers) {
$('#slotmachine').playSpin({
endNum: numbers,
});
});
});