当鼠标不在链接上时,关闭提示 [英] Close a cluetip when the mouse is off of the link
本文介绍了当鼠标不在链接上时,关闭提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当鼠标移离链接时,是否可以关闭cluetip
对话框?有mouseOutClose
选项,但是如果您没有先将鼠标悬停在cluetip
上,它就不会关闭.
Is there an option to close a cluetip
dialog when the mouse is moved off of the link? There is the mouseOutClose
option, but it doesn't close the cluetip
if you don't hover over it first.
这里是一个例子:
http://plugins.learningjquery.com/cluetip/demo/- jTip主题
推荐答案
在clueTips核心文件中 替换代码:
In the clueTips core file replace the code:
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论坛找到了解决方案,这里是链接
I found the solution from a jquery forum here is the link
http://plugins.jquery.com/content/cluetip-doesnt-关闭鼠标
它为我工作.
这篇关于当鼠标不在链接上时,关闭提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文