简体   繁体   English

为什么鼠标悬停时我的工具提示仍然不可见? (jQuery的)

[英]Why is my tooltip not remaining visible on mouseover? (jQuery)

I'm trying to get a tooltip to remain visible on mouseover. 我正在尝试获取一个工具提示,以使鼠标悬停时保持可见。 It works when you mouseover the first time. 当您第一次将鼠标悬停在上面时,它可以工作。 But try to mouseout, then mouseover another link and mouseover that tooltip. 但是尝试将鼠标移出,然后将鼠标悬停在另一个链接上,然后将鼠标悬停在该工具提示上。 It will fade. 它会褪色。

Check out the code on jsFiddle. 查看jsFiddle上的代码。 Would love to know what I'm doing wrong here. 很想知道我在这里做错了什么。

http://jsfiddle.net/6FpM8/7/ http://jsfiddle.net/6FpM8/7/

i know this is an oldish issue, but you could either change the delayOut option via either 我知道这是一个古老的问题,但是您可以通过以下任一方法更改delayOut选项

$(".id of tooltip").tipsy({delayOut: "length of time" });

or you could change it in tipsy's js. 或者您可以在Tipsy的js中进行更改。

Alternately, you could change the leave function in the js to suit your need. 或者,您可以更改js中的Leave函数以适合您的需求。

Little late for you but for others who may land here. 对您来说有点晚了,但对于其他可能会落在这里的人而言。 Use version from github . 使用来自github的版本 Then for title parameter of the plugin use this callback function 然后为插件的title参数使用此回调函数

$('.tooltip').tipsy({ html:true, delayOut:2000, title: function(){
        $('.tipsy').hide();
        return this.getAttribute('original-title');
    }
});

Try this 尝试这个

<a class="mylink" id="1" href="#" title="hey" >Test</a>
<a class="mylink" id="2" href="#" title="hey" >Test</a>
<a class="mylink" id="3" href="#" title="hey" >Test</a>

Just set the title via the html tag and not the JS, that worked in my Fire Fox. 只需通过html标记而不是JS(在我的Fire Fox中可以使用)设置标题即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM