invite.js 1.01 KB
if( !window.Coupon ){
    var Coupon = new Object();
}

Coupon.New = {
    init: function(){
        Coupon.New.shareDialog();                 //弹出引导层
        Coupon.New.closeShareDialog();           //关闭引导层
        Coupon.New.closeDialog();                //关闭弹出框
    },


    //弹出引导层
    shareDialog: function(){
        $('#send_gift').on('touch click',function(){
            $('#share_tag').fadeIn();
        });
    },

    //关闭引导层
    closeShareDialog: function(){
        $('#share_tag').on('touch click',function(){
            $('#share_tag').fadeOut();
        });
    },

    //关闭弹出框
    closeDialog: function(){
        $('#w_dialog').on('touch click',function(e){
            var e = e || window.event;
            if(e.target.id == 'w_dialog' || e.target.id == 'w_container' ||e.target.id == 'w_bg' || e.target.id == 'w_close' ){
                $('#w_dialog').fadeOut();
            }
        });
    }
};
window.onload = function(){
    Coupon.New.init();
};