我正在尝试弄清楚如何在您从事件 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/