javascript - 使用全日历在内容窗口上保持弹出窗口打开

标签 javascript jquery css twitter-bootstrap fullcalendar

我正在尝试弄清楚如何在您从事件 block 悬停到弹出窗口内容窗口时保持全日历弹出窗口在悬停时打开。

http://jsfiddle.net/rjayako/7zoqgroj/

目前,当您将鼠标悬停在事件 block 上时,弹出窗口会出现,但当您将鼠标悬停在其他任何地方时,它会立即消失。我想要实现的是,当您将鼠标悬停在弹出框本身时,该框仍会显示,以便用户可以单击弹出框内的链接。

到目前为止,这是我的弹出窗口的 eventRender 的样子

  eventRender: function(event, element) {
    element.popover({
      title: "My Title",
      placement: 'bottom',
      html: true,
      content: event.msg,
      trigger: "hover"
    });
  },

如有任何帮助,我们将不胜感激。

问候。

最佳答案

这是你的 answer .禁用动画并使弹出窗口手动触发。 JSfiddle

animation:false 
trigger: "manual"

这是完整的 eventRender:

eventRender: function (event, element) {
                    element.popover({
                    title: "My Title",
                    placement: 'bottom',
                    html: true,
                    animation:false,
                    content: event.msg,
                    trigger: "manual"
                        }).on("mouseenter", function () {
                            var _this = this;
                            $(this).popover("show");
                            $(".popover").on("mouseleave", function () {
                                $(_this).popover('hide');
                            });
                        }).on("mouseleave", function () {
                            var _this = this;
                            setTimeout(function () {
                                if (!$(".popover:hover").length) {
                                    $(_this).popover("hide");
                                }
                            }, 300);
                        });
                      }

关于javascript - 使用全日历在内容窗口上保持弹出窗口打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36900172/

相关文章:

Javascript:带有 for 循环的递归函数

javascript - Ember.js:如何观察输入字段中的值何时发生变化

javascript - 为值 =""中的每个单词创建 <div>

javascript - jquery ui 可调整 float 元素的大小。

jquery 范围 slider ,每小时美元值(value)

javascript - 如何删除数据表中本地存储中表中的特定行

javascript - 无法从 Javascript 调用 Flash 函数

php - 登录状态指示器功能不起作用

html - 将我的下拉菜单放在右边

javascript - 元素在移动设备上显示时不会居中,背景不会固定