我正在尝试在Qtip2 jquery中实现FullCalendar工具提示。Qtip2和FullCalendar都是非常好的jQuery插件和简单的实现。
我在我的FullCalendar插件中进行了FullCalendar集成,就像他们在http://qtip2.com/demos页面中建议的那样。
但是,即使在演示中我发现了类似的错误,工具提示也只是从事件中移开(特别是当我单击&关闭一个事件并移动到另一个事件时,您可以看到它将离开网格)
他们的查看源页面:http://jsfiddle.net/qTip2/T9GHJ/
发现问题的步骤:
我只是被困在这上面很久了。我无法找到解决办法。如果能在这方面提供任何帮助,我们将不胜感激。
发布于 2016-07-05 05:08:08
我与qtips的斗争也有一段时间了,但是下面是对我有用的代码。它防止了错误和看似随机的行为,特别是当你的鼠标左右移动或拖曳事件。
从完全日历的eventRender调用此函数。element是在eventRender函数中传递的第二个参数,其余参数是可选的(options对象包含工具提示的title和text、qTip2文档中定义的target和hideEvents,后者是JS事件的空格分隔列表,当触发工具提示(如"mousedown mouseup mouseleave")时将隐藏这些事件)。
/** adds a tooltip to a specified element, like an event or resource */
function addToolTip(element, o, target, hideEvents) {
if (target === undefined || target === null) {
target = false;
}
if (hideEvents === undefined) {
hideEvents = "mousedown mouseup mouseleave";
}
element.qtip({
content: {
title: o.title,
text: o.text
}
, position: {
my: "bottom center",
at: "top center",
target: target // "mouse" is buggy when dragging and interferes with clicking
//adjust: { y: -9}
}
, style: {
tip: { corner: 'bottom center' },
classes: 'qtip-light qtip-shadow'
},
show: {
effect: function () {
$(this).fadeTo(300, 1);
},
solo: true,
delay: 200
},
hide: {
effect: true,
event: hideEvents // otherwise stays while dragging
}
});
}https://stackoverflow.com/questions/38152013
复制相似问题