jQuery手机端红包雨抽奖代码

来源:https://www.sucaihuo.com/js/3509.html 2018-03-03 15:27浏览(1716) 收藏

一款实用的jQuery手机端红包雨抽奖代码,开场飞机拉横幅飞过动画,点击打开红包进行抽奖。
jQuery手机端红包雨抽奖代码
分类:抽奖 > 抽奖 难易:初级
查看演示 下载资源 下载积分: 20 积分

js代码

<script type="text/javascript" src="js/jqfloat.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('.dd').hide();
    setTimeout(function(){$('.dd').show();},6000);
    $('.dd').jqFloat({
        width: 1408,
        height: 800,
        speed: 7000,
        minHeight: 50
    });
    var select_div = function(tab,_text) {
        tab.click(function(){
            $(this).children('.tt').hide(); 
             $(this).css('backgroundImage','url(images/red-bag/hby_img_band.png)');
             setTimeout(function(){ tab.hide();$('.pop-box h5').text(_text);
             $('.fancy-overlay').show(); },200);           
             
        });
   };
   var select_div1 = function(tab) {
       tab.click(function(){         
             
             $(this).children('.tt').hide();            
             setTimeout(function(){ tab.css('backgroundImage','url(images/red-bag/home_btn_hby_bubble.png)'); tab.children('.tt').show(); },3000);
             
             
        });
   };
   

   select_div($('.div .dd:eq(0)'),'10金币');
   select_div($('.div .dd:eq(3)'),'5代金券');
   select_div($('.div .dd:eq(1)'),'再接再励');
   select_div($('.div .dd:eq(2)'),'20代金券');
   select_div($('.div .dd:eq(4)'),'再接再励');
   select_div($('.div .dd:eq(5)'),'15代金券');
   select_div($('.div .dd:eq(6)'),'再接再励');            
    $('.btn').click(function() {
            $('.fancy-overlay').hide();

        });
    var angle = 0;
    setInterval(function() {
        angle += 10;
        $(".tt img").rotate(angle);
    }, 100);
    // var hh = setInterval(bb(),10000);
    function bb(){

         $('.fly').prepend('<div class="fly_1"></div>');
         $('.fly_1').prepend('<img src="images/red-bag/fly.png">');
        // setTimeout(function(){        
         $('.fly_1').animate({
            'left':-100,
            'top': 100},
            10000, function() {
                $('.fly_1').remove();
           });

     // },100)
     
    };
    bb();
    var hh = setInterval(bb,15100);
    
})
</script>
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2