te.closest(elmObj.selector).length==0 && te.closest(elmCobj.selector).length!=1
$(document).on('click',function(e){
var te=$(e.target);
if(te.closest(elmObj.selector).length==0 && te.closest(elmCobj.selector).length!=1) {
bz=true;
elmObj.removeClass(cur);
elmCobj.hide();
}
});
我不是大神,只能看得出:
当点击这个的时候,获取target的属性,如果target的长度为0且不为1,bz为真,然后移除该元素的CSS类:.cur,并且隐藏该元素。