jQuery的IE浏览器bizzare问题可能包装问题? [英] Jquery IE bizzare issue Possible Wrap Issue?
问题描述
我为新网站提供了自定义悬停工具提示。它很好用,直到我们发现它在IE中不会消失
我认为它与 这里是snippit: 这是 http://jsfiddle.net/HxGtA/8/ 请注意,它适用于Chrome / Firefox,但不适用于IE 似乎无法解决它。 我认为在IE中它与某些事情有关一个更好的问题是 - 为什么你要创建和销毁包装器+弹出菜单在每一个盘旋?这是一个学术问题?为什么不在第一次悬停时创建工具提示,然后在随后的盘旋中显示/隐藏它?像这样: http://jsfiddle.net/scEbS/6/ (我没有在新示例中尝试修复样式) I have a custom hover tool tip for a new site. It works great until we noticed it doesn't go away in IE I think it has to do with the combination of the Here is that snippit: Here it is http://jsfiddle.net/HxGtA/8/ Notice it works in chrome/firefox but not in IE Can't seem to fix it. I think in IE it has something to do with a stricter interpretation of the mouseover/mouseout, and the added element positioning is screwing it up. But a better question is - why are you creating and destroying the wrapper+popup on every hover? Is this an academic question? Why not create the tooltip on the first hover, then show/hide it on subsequent hovers? Like this: http://jsfiddle.net/scEbS/6/ (I didn't try too hard to fix the styling in my new example) 这篇关于jQuery的IE浏览器bizzare问题可能包装问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! mouseover
和 .wrap()
命令
$ p $ $('。tooltip')。live('mouseover',function( ){
$ this = $(this).wrap('< span class =tooltip-wrap>< / span>');
...
live
listener to mouseover
and the .wrap()
command$('.tooltip').live('mouseover', function() {
$this = $(this).wrap('<span class="tooltip-wrap"></span>');
...