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 ("The eggs are all broken off");
Return
}
$ ("#hammer"). Stop (true);
Clearinterval (Dingshi);
var _this = obj;
$ (". Hammer"). CSS ({
"Top": "170px",
"Left": "420px"
});
SetTimeout (function () {
_this.addclass ("Curr"); Egg crushing effect
_this.find ("Sup"). Show (); Golden Flower Splash
$ (". Hammer"). Hide (); Hidden hammers
$ ('. Resulttip '). CSS ({
Display: ' Block ',
Top: ' 280px ',
Left: ' 315px ',
opacity:0
}). Animate ({
Top: ' 240px ',
Opacity:1
}, +, function () {
Dansui = 0;
$ ("#result"). HTML ("Congratulations, you got it" + rs.data.prize);
})
}, 300);
}
jquery smashing golden eggs high imitation ali travel smashing golden eggs