$(document).mousedown(function(e){ var _list = $('#pop'); if(!_list.is(e.target) && _list.has(e.target).length === 0){ $('#pop').hide(); } });
判断点击事件发生在区域外的条件:1. 点击事件的对象不是目标区域自己2. 事件对象同时也不是目标区域的子元素ide