JQuery卡片抽奖代码翻拍抽取红包特效代码
稿源: 互联网
这是一款jquery制作的手机翻牌抽奖领红包代码是一款移动端九宫格的翻牌抽奖代码。
使用方法
在页面引入以下jquery-1.9.1.min.js文件
<script src="js/jquery-1.9.1.min.js"></script>
<script> var clickstate = 0; var turn = function (target, time, opts) { target.find('a').click(function () { if (clickstate == 1) { return; } var current = $(this); $(this).find('.img').stop().animate(opts[0], time, function () { $(this).hide().next().show(); $(this).next().animate(opts[1], time); setTimeout(function () { $('#' + current[0].id).siblings('a').find('.info').addClass('shelter'); $('#' + current[0].id).siblings('a').find('.img').stop().animate(opts[0], time, function () { $(this).hide().next().show(); $(this).next().animate(opts[1], time); }); }, 1000); clickstate = 1; setTimeout(function () { if ($('#hb').html() != "10") { $('#iosDialog1').show(); } else { $('#iosDialog2').show(); } }, 3000); }); }); } var verticalOpts = [{ 'width': 0 }, { 'width': '90%' }]; turn($('#draw'), 400, verticalOpts); function ClosePage() { $('#iosDialog1').hide(); } function Refresh() { $('#iosDialog1').hide(); } function TurnMyCenter() { $('#iosDialog1').hide(); } </script>
相关插件