资源简介

jQuery幸运大转盘抽奖活动代码基于jquery.1.6.4.min.js实现,有免单5元、免单10元、免单50元、免单4999元、免分期服务费、提高白条额度、未中奖等奖项设置。


【核心代码】$(function (){

var rotateTimeOut = function (){
$('#rotate').rotate({
angle:0,
animateTo:2160,
duration:8000,
callback:function (){
alert('网络超时,请检查您的网络设置!');
}
});
};
var bRotate = false;

var rotateFn = function (awards, angles, txt){
bRotate = !bRotate;
$('#rotate').stopRotate();
$('#rotate').rotate({
angle:0,
animateTo:angles 1800,
duration:8000,
callback:function (){
alert(txt);
bRotate = !bRotate;
}
})
};

$('.pointer').click(function (){

if(bRotate)return;
var item = rnd(0,7);

switch (item) {
case 0:
//var angle = [26, 88, 137, 185, 235, 287, 337];
rotateFn(0, 337, '未中奖');
break;
case 1:
//var angle = [88, 137, 185, 235, 287];
rotateFn(1, 26, '免单4999元');
break;
case 2:
//var angle = [137, 185, 235, 287];
rotateFn(2, 88, '免单50元');
break;
case 3:
//var angle = [137, 185, 235, 287];
rotateFn(3, 137, '免单10元');
break;
case 4:
//var angle = [185, 235, 287];
rotateFn(4, 185, '免单5元');
break;
case 5:
//var angle = [185, 235, 287];
rotateFn(5, 185, '免单5元');
break;
case 6:
//var angle = [235, 287];
rotateFn(6, 235, '免分期服务费');
break;
case 7:
//var angle = [287];
rotateFn(7, 287, '提高白条额度');
break;
}

console.log(item);
});
});
function rnd(n, m){
return Math.floor(Math.random()*(m-n 1) n)
}
</script>

资源截图

代码片段和文件信息

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1716  2015-02-06 14:51  JQueryluckybigturntable\css\demo.css

     文件      41464  2015-02-03 14:52  JQueryluckybigturntable\images\pointer.png

    ..A.SH.     58880  2015-02-06 14:52  JQueryluckybigturntable\images\Thumbs.db

     文件      41466  2015-02-03 15:00  JQueryluckybigturntable\images\turntable-bg.jpg

     文件      75434  2015-02-03 14:45  JQueryluckybigturntable\images\turntable.png

     文件       2562  2017-01-23 13:36  JQueryluckybigturntable\index.html

     文件      11161  2013-09-09 09:43  JQueryluckybigturntable\js\awardRotate.js

     文件      91671  2015-02-06 14:37  JQueryluckybigturntable\js\jquery.min.js

     文件        147  2017-01-23 13:31  JQueryluckybigturntable\Web.config

     目录          0  2015-02-06 14:52  JQueryluckybigturntable\css

     目录          0  2015-02-06 14:53  JQueryluckybigturntable\images

     目录          0  2015-02-06 14:47  JQueryluckybigturntable\js

     目录          0  2018-05-09 14:06  JQueryluckybigturntable

----------- ---------  ---------- -----  ----

               324501                    13


评论

共有 条评论