jquery点击弹框外层关闭弹框

时间:2014-06-06 18:23:38   收藏:0   阅读:287

$(document).bind("click",function(e){
            if($( e.target ).closest(".game-container").length == 0){
                alert(111);
                $(".game-container").hide();//game-container是弹框的样式名称
            }else{
                alert(222);//这里是点击弹框的事件
            }
        })

jquery点击弹框外层关闭弹框,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!