zoukankan      html  css  js  c++  java
  • bootstrap 弹出框实现点击后打开离开后关闭

     $("#PersonName").popover({
                    trigger: 'manual',
                    placement: 'bottom',
                    //title: '<div style="text-align:center; color:red; text-decoration:underline; font-size:14px;"> Muah ha ha</div>', 
                    html: 'true',
                    content: '<div id="popOverBox" style="color:#000;">' + htmlStr + '</div>',
                    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content">sdfsdfds</div></div>',
                    animation: false
                }).on("mouseenter", function () {
                    var _this = this;
                    $(this).popover("show");
                    $(this).siblings(".popover").on("mouseleave", function () {
                        $(_this).popover('hide');
                    });
                }).on("mouseleave", function () {
                    var _this = this;
                    setTimeout(function () {
                        if (!$(".popover:hover").length) {
                            $(_this).popover("hide");
                        }
                    }, 100);
                });
    <span id="PersonName" rel="drevil" 
                                                        style="margin-left: 5px; line-height: 35px; font-size: 13px; color: white;" ></span>
  • 相关阅读:
    C#Web网站的创建
    C#Repeater控件的使用
    C#LINQ
    C#异常处理
    C#LINQ
    C#匿名委托,匿名函数,lambda表达式
    C#chart图表的应用
    C#用户控件的使用
    用 Python写 daemon
    CentOS 5.4 制作 Python 2.6 RPM 包的方法
  • 原文地址:https://www.cnblogs.com/xiaoruilin/p/9617627.html
Copyright © 2011-2022 走看看