我尝试了这段代码
得到了SyntaxError: missing ) after argument list
是否有更好的调试器可以在Mac上显示更易理解和准确性错误?
jQuery(document).ready(
$('.fancy .slot').jSlots({
number : 2,
winnerNumber : 1,
spinner : '#playFancy',
easing : 'easeOutSine',
time : 7000,
loops : 6,
onStart : function() {
$('.slot').removeClass('winner');
},
onWin : function(winCount, winners) {
// only fires if you win
$.each(winners, function() {
this.addClass('winner');
});
// react to the # of winning slots
if ( winCount === 1 ) {
alert('You got ' + winCount + ' 7!!!');
}
else if ( winCount > 1 ) {
alert('You got ' + winCount + ' 7’s!!!');
}
}
});
);
答案 0 :(得分:3)
您错过了function
关键字:
jQuery(document).ready(function (){
// code here
});
答案 1 :(得分:0)
你错过了第一个{after document.ready应该是这样的
$(document).ready(function(){
});