cluetip
当鼠标移出链接时,是否有关闭对话框的选项?有选项,但如果您不先将鼠标悬停在它上面mouseOutClose
,它不会关闭。cluetip
这是一个例子:
http://plugins.learningjquery.com/cluetip/demo/ - jTip Theme下的第一个链接
cluetip
当鼠标移出链接时,是否有关闭对话框的选项?有选项,但如果您不先将鼠标悬停在它上面mouseOutClose
,它不会关闭。cluetip
这是一个例子:
http://plugins.learningjquery.com/cluetip/demo/ - jTip Theme下的第一个链接
在线索提示核心文件中替换代码:
if (opts.mouseOutClose) {....}
和
if (opts.mouseOutClose) {
var closectip;
$cluetip.hover(function() {
clearTimeout(closectip);
},
function() {
$closeLink.trigger('click');
});
$this.hover(function() {
clearTimeout(closectip);
}, function() {
closectip = setTimeout(cluetipClose, 1000);
});
}
我从一个 jquery 论坛找到了解决方案,这里是链接
http://plugins.jquery.com/content/cluetip-doesnt-close-mouseout
它为我工作。
我遇到了同样的问题,我找到了解决方案。
它正在工作。
所以,我们都想要的是一种方法
1-当链接悬停时显示提示,然后在鼠标熄灭时丢弃它
2-但是如果鼠标确实进入了内部,请保持线索提示打开,以便它可以单击线索提示内的链接
这是如何做到的。
只需添加此参数:
sticky: true,
onShow: function(){
$('.mylink').mouseout(function() { // if I go out of the link, then...
var closing = setTimeout(" $(document).trigger('hideCluetip')",400); // close the tip after 400ms
$("#cluetip").mouseover(function() { clearTimeout(closing); } ); // unless I got inside the cluetip
});
}
就是这个 !
这是因为sticky选项设置为true...