jquery砸金蛋 高仿阿里旅游砸金蛋

2015-07-14 0 669
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);

 

}


jquery砸金蛋 高仿阿里旅游砸金蛋

遇见资源网 js/jquery jquery砸金蛋 高仿阿里旅游砸金蛋 http://www.ox520.com/11217.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务