使 jQuery Tipsy 工具提示随鼠标移动
我确信这是可能的——而且可能非常简单——但我不知道如何让它发挥作用。如何使 Tipsy 工具提示随鼠标水平移动?
当鼠标悬停在启用 Tipsy 的元素上时,我希望工具提示显示在其正常的 Y 位置(元素正上方),但我希望它等于鼠标的 X 位置。让事情变得有点复杂的是,我试图仅对重力为 2 个字符(“nw”、“ne”、“sw”、“se”)的元素启用 mousemove 功能。
没有代码可以发布,因为我尝试过的所有方法都不起作用,并且该插件是公开可用的。
I'm sure this is possible -- and probably very easy -- but I can't figure out how to make it work. How can I make a Tipsy tooltip move horizontally along with the mouse?
When hovering over a Tipsy-enabled element, I want the tooltip to appear at its normal Y position (directly above the element), but instead of having the X position fixed at the center of the element, I want it to be equal to the mouse's X position . To complicate things a bit, I'm trying to have the mousemove function enabled ONLY for elements that have a gravity of 2 characters ('nw', 'ne', 'sw', 'se').
No code to post, as everything I've tried hasn't worked and the plugin is publicly available.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请注意,笔尖不会完全跟随鼠标。它将跟随应用尖端的元素的相应边缘。
如果您希望提示跟随鼠标在显示屏上的实际位置,那么您应该考虑使用不同的插件。
使用方法:
插件本身(需要更多测试)
Note, tip won't follow mouse completely. It''ll follow on the respective edge of the element to which tip is applied.
If you want tip to follow mouse where it's actually is on the display, then you should consider using different plugin.
How to use:
Plugin itself (needs more testing)