jquery砸金蛋 高仿阿里旅游砸金蛋
2018-07-20 来源:open-open
function zadan(obj) {
$(obj).children("span").hide();
eggClick($(obj));
};
function donghua() {
$("#hammer").animate({
top : "150px",
left : "420px"
}, 1000);
$("#hammer").animate({
top : "110px",
left : "455px"
}, 1000);
}
var dingshi = setInterval("donghua()", 2000);
var dansui = 1;
function eggClick(obj) {
if (dansui == 0) {
alert("蛋都碎掉了");
return;
}
$("#hammer").stop(true);
clearInterval(dingshi);
var _this = obj;
$(".hammer").css({
"top" : "170px",
"left" : "420px"
});
setTimeout(function () {
_this.addClass("curr"); //蛋碎效果
_this.find("sup").show(); //金花四溅
$(".hammer").hide(); //隐藏锤子
$('.resultTip').css({
display : 'block',
top : '280px',
left : '315px',
opacity : 0
}).animate({
top : '240px',
opacity : 1
}, 300, function () {
dansui = 0;
$("#result").html("恭喜,您中得" + rs.data.prize);
})
}, 300);
}
标签: isp
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点!
本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。
上一篇: Jquery仿京东分类导航层简单实现
最新资讯
热门推荐