$(document).on('click', function (e) {
$('[data-toggle="popover"],[data-original-title]').each(function () {
//the 'is' for buttons that trigger popups
//the 'has' for icons within a button that triggers a popup
if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
(($(this).popover('hide').data('bs.popover')||{}).inState||{}).click = false // fix for BS 3.3.6
} });
});

点击Popover外区域自动关闭Popover (popover close when click outside)的更多相关文章

  1. 设立点击ProgressDialog外的区域对话框不消失

    设置点击ProgressDialog外的区域对话框不消失ProgressDialog mpDialog = new ProgressDialog(OrderTable.this);  mpDialog ...

  2. 【JS】点击目标外事件与IFRAM自适应高度

    一.点击目标外事件 $(document).mouseup(function(e){ var _con = $('.dropdown-multiSelect-list'); // 设置目标区域 if( ...

  3. 禁用Bootstrap点击空白,modal自动关闭

    手动触发modal:       $('#myModal').modal(): 禁用点击空白,modal自动关闭:$('#myModal').modal({backdrop: 'static', ke ...

  4. jquery点击非div区域隐藏div

    点击非div区域隐藏div,如图,点击圆的头像(.person-msg)弹出白色底框(.person-centre).点击圆头像以外的区域隐藏白色底框

  5. contains 之 点击元素外位置隐藏元素

    contains 之 点击元素外位置隐藏元素 api: contains   检测一个元素包含在另一个元素之内  详解:http://www.runoob.com/jquery/misc-contai ...

  6. vue-封装组件-结合vant实现点击按钮弹出泡泡(Popover)事件控制多个泡泡出现时,弹出对应的泡泡

    <template> <div class="sale-share-box"> <span class="sale-share-btn&qu ...

  7. 点击除指定区域外的空白处,隐藏div

    <script> $(document).click(function (e) { var $target = $(e.target); //点击.zanpl和.quanzipl以外的地方 ...

  8. jQuery实现点击div外的区域,来隐藏指定节点

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script sr ...

  9. Bootstrap 模态框在用户点击背景空白处时会自动关闭

    问题: Bootstrap 模态框在用户点击背景空白处时,会自动关闭. 解决方法: 在HTML页面中编写模态框时,在div初始化时添加属性 aria-hidden=”true” data-backdr ...

  10. 【转】Android AlertDialog 点击对话框外部区域不关闭的设置

    原文网址:http://blog.sina.com.cn/s/blog_8f1c79dd0101a63u.html 在Android开发中,常常需要调用对话框,但会遇到这样一种情况,在显示对话框的时候 ...

随机推荐

  1. Kubernetes利用Volume挂载ConfigMap与Secret

    1.概述 在Kubernetes集群中,应用的配置管理是一个关键且复杂的任务.随着应用的扩展和微服务架构的普及,传统的配置文件管理方式已经难以满足动态.灵活的配置需求.幸运的是,Kubernetes提 ...

  2. spm 一阶分析的Microtime onset应该如何填写?

    1. 如果对数据进行了slice timing, 那么在进行一阶分析时应该修改microtime onset和 microtime resolution这两个参数, 假设数据的slice order= ...

  3. in notin exists not exists 性能优化算法总结

    in notin exists not exists 性能优化算法总结 1.1. in 和 exists 区别 1.2. not in 能不能走索引 1.3. not in 和 join 的关系 1. ...

  4. Linux firewalld 的用法

    大乌龙事件之防火墙作祟: 在我的初始化环境中 selinux.iptables.firewalld 是关闭的, 莫名的firewalld 是没有关闭的这是我在安装完docker后一段时间后部署jenk ...

  5. zabbix-server无法启动

    部署:Zabbix-(1)安装 - xiao智 - 博客园 (cnblogs.com) 故障现象: 监控界面状态为 "否" 1.服务状态果然报错了 ,报错提示是被退出的 2.net ...

  6. Excel中制作目录的3种方法,你了解几种?

    点赞再看,养成习惯:言之无文,行而不远. 微信搜索[亦心Excel]关注这个不一样的自媒体人. 本文 GitHub https://github.com/hugogoos/Excel 已收录,包含Ex ...

  7. 小tips:nodejs请求接口超时使用中间件connect-timeout实现自动超时机制

    如果在请求中不设置超时时间,那么一直处理loading卡屏状态,使用connect-timeout来设置自动超时时间. 安装: npm install connect-timeout -S 如下例子: ...

  8. EF Core – 7.0 New Features

    前言 这篇不会细谈功能, 只是一个总链接. 参考 Docs – What's New in EF Core 7.0 Breaking Change 参考: Docs – Breaking change ...

  9. Azure – Azure Active Directory

    前言 虽然它好像是快过时了, 但目前还得用到. 先不研究新的先. Azure 的 service 如果要通过 API 调用的话, 就需要 Azure Active Directory (Azure A ...

  10. Shell分析服务器日志命令

    1.查看有多少个IP访问: awk '{print $1}' log_file|sort|uniq|wc -l 2.查看某一个页面被访问的次数: grep "/index.php" ...