jQuery 工具提示的可靠性只有 90% 左右吗? (以及如何解决它?)
jQuery Tools 1.2.5 Tooltip 看起来相当光滑和花哨,但我将其添加到我们的开发网站,90% 的时间都可以正常工作。有时,鼠标悬停在选项卡上,不会显示工具提示;有时,鼠标离开选项卡,工具提示仍然存在。 (即使在 Firefox 或 Chrome 上)
为什么会这样呢?
另外,在 IE 7 上,工具提示(是 HTML,而不仅仅是文本)将弹出另一个 div
,而不是包含工具提示的那个。 (在 IE 8 和 9 上,它工作正常)。所以我猜它在 90% 的情况下对我有效……如果不是 99.9%,那还不够好。所以现在我正在考虑要么调试它要么使用另一个工具提示,有什么建议吗?或者标准的 jQuery 插件工具提示是最可靠的吗?此页面上有 30 个...实在是太多了!
jQuery Tools 1.2.5 Tooltip seems quite slick and fancy, but I added it to our development site, and it works 90% of the time. Sometimes, the mouse hover over a tab and no tooltip shows up, and sometimes, the mouse leave the tab and the tooltip is still there. (even on Firefox or Chrome)
Why can that be?
Also, on IE 7, the tooltip (which is HTML, not just text), will pop out a different div
, not the one that contains the tooltip. (on IE 8 and 9, it works fine). So I guess it works 90% of the time for me... and that's not good enough if it is not 99.9%. So right now I am thinking either debugging it or use another tooltip, any suggestion? Or is the standard jQuery Plugin Tooltip the most reliable? There are 30 of them on this page... that's just too much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在我看来, jQuery Tools 1.2.5 工具提示插件是垃圾。工具提示通常会部分隐藏地弹出,有时根本不弹出。无论他们添加什么花哨的功能,如果基本的工具提示功能不可靠,那么额外的花哨就没用了。
jQuery 插件工具提示 更加可靠,每次都会弹出,并且处于良好的不被遮挡的位置。
The jQuery Tools 1.2.5 Tooltip plugin is garbage in my opinion. The tool tips often pop-up partially hidden and sometimes don't pop-up at all. It doesn't matter what fancy features they add, if the basic tooltip functionality isn't reliable, the extra fanciness is useless.
jQuery Plugin Tooltip is much more reliable, pops up every time, and in a good non-obscured position.
好吧,我又尝试了一些,结果发现预打包的“完整”版本的 jQuery 1.4.2 和 jQuery Tools 运行良好,大约 99.9% 的时间(对于带有滑动效果的工具提示和 HTML 样式的工具提示)。 (更新:我今天又试了一次,只有 95% 可靠……唉……)
在 http://flowplayer.org/tools/download/index.html
我使用的是我们的 jQuery 1.5.1,它只在 90% 的时间里工作,而 jQuery Tools 则没有大约半年没有更新了...(稳定版本)...所以我猜它确实与最新的 jQuery 存在一些兼容性问题。我想我曾经尝试过 1.4.4,但我记得它也运行得不太好。但我想,对于任何库,都可以尝试使用它所依赖的所有预打包库。只是如果我们的项目使用的另一个库依赖于 jQuery 1.5.1,那么同时使用 1.4.2 和 1.5.1 可能会更困难。
Ok, I tried some more and it turns out that the prepackaged "full" version of jQuery 1.4.2 with jQuery Tools work well, about 99.9% of the time (for the Tooltips with sliding effect and HTML style tooltips). (Update: I tried again today, and it is only 95% reliable... sigh...)
In http://flowplayer.org/tools/download/index.html
I was using with our jQuery 1.5.1 and it worked only 90% of the time, and jQuery Tools wasn't updated for about half a year... (the stable version)... so I guess it does have some compatibility issue with the newest jQuery. I think at a point I was trying with 1.4.4 and it didn't work too well either as I recall. But I suppose, with any library, try it with all the pre-packaged libraries it depends on. Just that if another library our project uses depends on jQuery 1.5.1, then it can be harder to use both 1.4.2 and 1.5.1.