点击空白处隐藏div

$(window).on('click','.border_box',function(e){
        var e=window.event || event;
        if(e.stopPropagation){
            e.stopPropagation();
        }else{
            e.cancelBubble = true;
        }; 
        $(document).on('click',function(e){
            $('.data_list').addClass('hide');
        });
    });

 

posted @ 2017-02-10 14:08  fiona118  阅读(275)  评论(0编辑  收藏  举报