$(document) 和 $(e.target)实现div的显示和隐藏

$(document).click(function(e){

    if($(e.target).hasClass("zm_view")){
        $(".question").hide();
        $(e.target).parent().parent().next().show();
}

});

$(document) 是当前文档,就是你看到的整个网页

$(window) 如果没有框架则就是你浏览的当前浏览器的窗口

原文地址:https://www.cnblogs.com/cornucopia/p/4210931.html