快樂抽獎
祝各位中大獎
  • A
  • B
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
Example 3 - Stop sequence
Specify stop sequence from left to right or right to left or totally random (like example 1)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
View Code
$('#btn-example3').click(function() {
  $('#example3 ul').playSpin({
    stopSeq: 'leftToRight', // rightToLeft
  });
});
Example 4 - Easing
Easing effect, default: swing (Import jquery-easing and select easing effect here: link)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
View Code
$('#btn-example4').click(function() {
  $('#example4 ul').playSpin({
    easing: 'easeOutBack',
  });
});
Example 5 - Spin Time
Change spin time to wait longer or wait shorter. (Value is set in milliseconds, 1 second = 1,000 milliseconds)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
View Code
$('#btn-example5').click(function() {
  $('#example5 ul').playSpin({
    time: 1000,
  });
});
Example 6 - Images
Not only limited to numbers !! It can be images as well.
View Code
$('#btn-example6').click(function() {
  $('#example6 ul').playSpin({});
});
Example 7 - onEnd and onFinish
onEnd - Every number of slot number end function. (The given number is depending on number stop sequence)
onFinish - All number of slot number end funtion. (The given number is by sequence from left to right)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
onEnd: onFinish: View Code
$('#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);
    }
  });
});
Example 8 - Sounds
Sounds control is not implemented and left fully for programmer to program.
Following is example on how to intergrate with sounds and music. (Open speaker!)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
View Code
$('#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
    }
    });
});
快樂抽獎
祝各位中大獎
  • 001
  • 002
  • 003
  • 004
  • 005
  • 006
  • 007
  • 008
  • 009
  • 010
  • 011
  • 012
  • 013
  • 014
  • 015
  • 016
  • 017
  • 018
  • 019
  • 020
  • 021
  • 022
  • 023
  • 024
  • 025
  • 026
  • 027
  • 028
  • 029
  • 030
  • 031
  • 032
  • 033
  • 034
  • 035
  • 036
  • 037
  • 038
  • 039
  • 040
  • 041
  • 042
  • 043
  • 044
  • 045
  • 046
  • 047
  • 048
  • 049
  • 050
  • 051
  • 052
  • 053
  • 054
  • 055
  • 056
  • 057
  • 058
  • 059
  • 060
  • 061
  • 062
  • 063
  • 064
  • 065
  • 066
  • 067
  • 068
  • 069
  • 070
  • 071
  • 072
  • 073
  • 074
  • 075
  • 076
  • 077
  • 078
  • 079
  • 080
  • 081
  • 082
  • 083
  • 084
  • 085
  • 086
  • 087
  • 088
  • 089
  • 090
  • 091
  • 092
  • 093
  • 094
  • 095
  • 096
  • 097
  • 098
  • 099
  • 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
View Code
$('#btn-example9-start').click(function() {
  $('#example9 ul').playSpin({
    manualStop: true
  });
});

$('#btn-example9-stop').click(function() {
  $('#example9 ul').stopSpin();
! });
Example 10 - Marks
To stop each spin individually, it is required to generate startSpin on each spin individually.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 0
  • .
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 0
  • %
View Code
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--;
});
快樂抽獎
祝各位中大獎
  • 001
  • 002
  • 003
  • 004
  • 005
  • 006
  • 007
  • 008
  • 009
  • 010
  • 011
  • 012
  • 013
  • 014
  • 015
  • 016
  • 017
  • 018
  • 019
  • 020
  • 021
  • 022
  • 023
  • 024
  • 025
  • 026
  • 027
  • 028
  • 029
  • 030
  • 031
  • 032
  • 033
  • 034
  • 035
  • 036
  • 037
  • 038
  • 039
  • 040
  • 041
  • 042
  • 043
  • 044
  • 045
  • 046
  • 047
  • 048
  • 049
  • 050
  • 051
  • 052
  • 053
  • 054
  • 055
  • 056
  • 057
  • 058
  • 059
  • 060
  • 061
  • 062
  • 063
  • 064
  • 065
  • 066
  • 067
  • 068
  • 069
  • 070
  • 071
  • 072
  • 073
  • 074
  • 075
  • 076
  • 077
  • 078
  • 079
  • 080
  • 081
  • 082
  • 083
  • 084
  • 085
  • 086
  • 087
  • 088
  • 089
  • 090
  • 091
  • 092
  • 093
  • 094
  • 095
  • 096
  • 097
  • 098
  • 099
  • 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
Spin time:
Stop time: