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>
  • 相关阅读:
    rabbitmq使用
    redis
    IO模型与IO复用介绍
    事件驱动与异步IO使用
    协程
    进程
    线程、锁
    paramiko模块与 StringIO模块
    socketserver 编程
    随记
  • 原文地址:https://www.cnblogs.com/xiaoruilin/p/9617627.html
Copyright © 2011-2022 走看看