jquery点击非div区域隐藏div
点击非div区域隐藏div,如图,点击圆的头像(.person-msg)弹出白色底框(.person-centre)。点击圆头像以外的区域隐藏白色底框
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAFPCAIAAADm4DRfAAAgAElEQVR4nO2d/VOTV9rH+wftPD+seSEEEAKt3W1n3Yq1Vre1Ftqts6N2unYNdXceGLcMyqC2pt0qs84zuEtnt1lGlynZRQdWq7MFre1Ag0FNpFReiiRVYwRFcp4frjsn535JcickATnf73zHIe+J+Zwr17nu+1znqS11bhiWyk8t+zuA4SIb0MPSGdDD0hnQwwX0/oPHOz7t9p4+4ztzYSQQHBufjMXmYrG5sfHJS1f85y5c9p4+0/Fp9/6Dx4v5rgA9nGfX72zcf/C478yFsfFJZlqx2JzvzIXi0A/o4by5ofED35kLsdgcR3ly6vbV0dBIIDQSCIXGbn03PjkbjsyGI9M/3L5247vAtZv+QNAfCIbDd8QBcOmKf/fvDhTufQJ6OA+u39ko4j42PuEPBG9+d+vq1aunTp06dOjQ3r176+vrN2/evHHjxtra2s2bN7/55pt79+49cuRId3d3IBC4EfxuJBAaG5/g6PvOXCgQ+oAeXpJF3B88mLs6Gvr+1tSXX3554MCBl156qaKiwmKxWCwWu93ucDicTmdZWVlZWZnT6XQ4HDabzWKxWK3WtWvXbtmy5dChQ1999VX0fuzqaEhEP+/vGdDDuXv/weNidL859n1XV9f27dtLS0utVqvT6XS5XDUJVVdXV1dXu1yu6oT4TVVVVU6n02KxOJ3ON954o7u7e/qH24FrN3m6n99cH9DDObrj024ifmx8YnJq5vPPP3/55ZetVmtpaSmx7nK5qqqqqqqqXGrxa8Q/aAy4XC6Hw2G1Wl999dWzZ89OTs1cD44T+h2fdufrnQN6OGtTSkMsXh0NjV67/s4779hsNqfTSRG9Kq3EwaC/ieh3Op12u93tdk9OTvoDwfymOoAezs71OxsvXfFT1hG4dvPf//73unXrbDZbmtBuXnwkEP1Wq/X5558/d+4cr36OjU/W72xc4kcA9HAWFom/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+rcMCyVEelh6QzoYekM6GHpDOhh6QzoYekM6GHpDOhh6QzoYemMlVOwdMYaWVg6A3pYOgN6WDoDelg6A3pYOgN6WDoDelg6A3pYOgN6WDoDelg6A3pYOucFetpEljHG5rvWh0OJC4abJzPdrbXN0Yh4EdDDhXW+oI9EW5RNwJWtwGnH8JaBhQKsrvMAAAD9SURBVMjAhG7H8HCI8W3BwyHGQsH57PdPBvRwbl4W6L3zdJGIpz3EWwYWWCTaAujhgnsZoA8PRhYGm5WshogX0iT+CwDo4QJ5GaCPhtjCoDcaUbIalSID0ZDZ/B7Qw7l56dB7teCqII6kSG9UmczEYAQTWbhoXr6JbCi4kGKgmMzsAT2cm5e/eoNIDxfZRYdeDOeJ6xXou4LmZ7GAHs7Z+YCeyK4l3BP5OkHP76CO9OJQESN9soIJ6OGCOQ/Qi8jOhxJYZ4Je+UHQpTcTSkET0MOF8tKhb45GgmGlhhNZiLD5ruZohDGquLcMLCRqkRPaSJ/APXH+AnJ6uDj+f4FGavfiKFdIAAAAAElFTkSuQmCC" alt="" />
html代码
<div class="per_c">
<div class="person-msg pull-right">
<img src="../../res/images/snow_man.jpg">
</div>
<dl class="person-centre" style="display: none;">
<dt>你好!大雪人</dt>
<dd><a href="#">账号安全</a></dd>
<dd><a href="#">修改资料</a></dd>
<dd><a href="#">我的头像</a></dd>
<dd><a href="#">我的申请</a></dd>
<dd><a href="#">账号退出</a></dd>
</dl>
</div>
jquery方法
/*点击头像个人信息*/
$(".person-msg").click(function () {
$(".person-centre").toggle(); });
$(document).bind("click",function (e) {
var target=$(e.target);
if(target.closest(".person-msg").length==0){
$(".person-centre").hide();
console.log("111")
}
});
closest()从元素本身开始,逐级向上级元素匹配,并返回最先匹配的祖先元素。
target 属性规定哪个 DOM 元素触发了该事件。
target.closest(".person-msg"):遍历".person-msg"触发事件
if(target.closest(".person-msg").length==0):判断条件为(如果遍历后发现".person-msg"没有触发click事件)
可以查看w3c,了解这两个方法的使用。
后续有更新再慢慢补充
更6的方法移步:http://bbs.blueidea.com/thread-3043426-1-1.html
之前打算使用监听来写,但是有兼容问题而且不够了解。
遍历的方法:http://www.w3school.com.cn/jquery/jquery_ref_traversing.asp
注意区分e.target与e.currentTarget的作用
jquery点击非div区域隐藏div的更多相关文章
- Js-Html 前端系列--点击非Div区域隐藏Div
最近做项目要用到三字码下拉,调用一个插件,但是滚动条不能点击. 后来看另一个插件后突发奇想,在点击其他区域的时候隐藏这个Div就可以了. 背景:输入文字,弹出下拉Div,点击或者拉动Div滚动条选择, ...
- jquery点击按钮显示和隐藏DIv
function changeDisplay() { if ($("#btnShow").attr("value")== "添加附件") { ...
- jquery点击页面其他位置隐藏div
$("#btnAdd").on('click', function (e) { $("#setUp").toggle(); $(document).one('c ...
- React 点击按钮显示div与隐藏div,并给div传children
最近做了一个react的点击按钮显示与隐藏div的一个小组件: [筛选]组件FilterButton import React,{Component} from 'react'; import {re ...
- 点击按钮显示隐藏DIV,点击DIV外面隐藏DIV
点击按钮显示隐藏DIV,点击DIV外面隐藏DIV 注意:此方法对touch事件不行,因为stopPropagation并不能阻止touchend的冒泡 <style type="tex ...
- 点击页面其它地方隐藏div所想到的jQuery的delegate
在网页开发的过程中经常遇到的一个需求就是点击一div内部做某些操作,而点击页面其它地方隐藏该div.比如很多导航菜单,当菜单展开的时候,就会要求点击页面其它非菜单地方,隐藏该菜单. 先从最简单的开始, ...
- 由点击页面其它地方隐藏div所想到的jQuery的delegate
对于这个问题一般有两种思路,这两种思路都会利用事件冒泡这一原理,想要详细了解Javascript事件机制可以看看JavaScript与HTML交互——事件,这不是本文重点,所以这里只是简单介绍一下事件 ...
- JQ 点击指定文本框显示div。点击其他区域隐藏DIV
<input id="username" type="text" style="width:90%;margin-top: 40px;" ...
- jquery实现点击div外隐藏div
html <div style="width:100px;height:100px;border:1px solid #ff0" id="div"> ...
随机推荐
- T_SQL编程赋值、分支语句、循环
咱们在C#中会常用到赋值.循环.分支语句什么的 今天咱们来看下当初在C#用到的一点东西放到SQL中是怎么使用的 创建变量 在C#中创建一个值类型变量很简单 int a:这就可以了 SQL: decla ...
- IE和其他浏览器用JS新窗口打开的问题
Chrome中 window.open(pageURL,name,parameters) pageURL 为子窗口路径 name 为子窗口句柄 parameters 为窗口参数(各参数用逗号分隔) 例 ...
- C#邮件发送开发经本人测试通过
先准备以下工作 1.先开通邮箱我以QQ邮箱为例 2.开通 POP3/SMTP服务 (如何使用 Foxmail 等软件收发邮件?) 已开启 | 关闭 获取授权码 3.C#开发了先写一个CS文件 pub ...
- dotnetcore中的IOptionsSnapshot<>的自动更新原理
1.首先讲讲ChangeToken.OnChange方法: 原理是给一个CancellationToken注册一个消费者委托,调用CancellationToken的Cancel的时候会调用这个Can ...
- Java集合之Map和Set
以前就知道Set和Map是java中的两种集合,Set代表集合元素无序.不可重复的集合:Map是代表一种由多个key-value对组成的集合.然后两个集合分别有增删改查的方法.然后就迷迷糊糊地用着.突 ...
- Linux 3.2中回写机制的变革
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://alanwu.blog.51cto.com/3652632/1109952 wri ...
- 【算法系列学习】状压dp [kuangbin带你飞]专题十二 基础DP1 D - Doing Homework
https://vjudge.net/contest/68966#problem/D http://blog.csdn.net/u010489389/article/details/19218795 ...
- poj1751最小生成树
The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of p ...
- MySQL游标的简单实践
Q:为什么要使用游标? A: 在存储过程(或函数)中,如果某条select语句返回的结果集中只有1行,可以使用select into语句(上几篇博客有介绍到用法)来得到该行进行处理:如果结果集中有多行 ...
- Linux目录与文件的权限
零.Linux中的权限为什么重要? 权限直接关系数据安全! 一.用户基础概念: 所有者(owner):拥有这个文件的用户.一般拥有目录或文件的所有权限. 用户组(group):几个用户组成一个用户组, ...