html 元素中增加属性 data-toggle及data-content

 <label data-toggle="popover" data-content="111">测试</label>

  js中增加

 $(function () {
        $("[data-toggle='popover']").popover({
            trigger:'manual',
            placement : 'top',//弹出位置
            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);
        });
    });

  参考链接:https://www.jb51.net/article/87218.htm

相关文章:

  • 2021-10-19
  • 2021-11-12
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
猜你喜欢
  • 2022-12-23
  • 2021-04-02
  • 2021-07-23
  • 2022-01-23
  • 2021-08-15
  • 2021-09-15
  • 2021-05-09
相关资源
相似解决方案