$(function(){
$(document).bind("click",function(e) {
var t = $(e.target);
//#in,.dd 为指定的区域,#box为想消失的div
if(!t.is('#in') && !t.is("#box") && !t.is(".dd")) {
if ($('#box').is(':visible') ) {
$('#box').hide();
}
}
})
})
点击除指定区域外,div消失
原创
©著作权归作者所有:来自51CTO博客作者莫唯轩_彦的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
OSPF单区域实验
华为HCIP-Datacom实验系列-OSPF单区域
OSPF Ethernet IP -
OSPF多区域实验
华为HCIP-Datacom实验系列之OSPF多区域实验
OSPF Ethernet IP -
除自身以外数组的乘积【前缀和】
时间复杂度:空间复杂度:
前缀和 空间复杂度 List 时间复杂度 -
Day23 - document以外的常用对象
」 知识讲解 window对象以外的常用对象可以大体上分为两类,一类是BOM
JavaScript 面试 前端 当前页 数据库