jquery工具提示/移动鼠标移动/工具提示鼠标位置 [英] jquery tooltip / moves with mouse move / tooltip with mouse position
本文介绍了jquery工具提示/移动鼠标移动/工具提示鼠标位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
jQuery Tools工具提示对我来说没问题!
但是我希望它随着鼠标移动而移动(相对于鼠标位置的工具提示)。我怎样才能做到这一点?或者是否有其他任何插件?
But i want it to move with mouse move (tooltip relative to mouse position). How can i do that? Or is there any other plugin in this way?
推荐答案
我不认为可以使用jQuery TOOLS工具提示插件。
I don't think it's possible to do with the jQuery TOOLS tooltip plugin.
Bassistance Tooltip插件确实支持你想要的东西。使用 track:true
,如此演示:
The Bassistance Tooltip plugin does support what you want. Use track: true
, as in this demo:
$('#yahoo a').tooltip({
track: true,
delay: 0,
showURL: false,
showBody: " - ",
fade: 250
});
如果您不喜欢该插件,< a href =http://craigsworks.com/projects/qtip2/ =nofollow> qTip2 还支持鼠标跟踪。请参阅此演示(相当于jsFiddle 这里)。
If you don't like that plugin, qTip2 also supports mouse tracking. See this demo (equivalent jsFiddle here).
$('#demo-mouse').qtip({
content: 'I position myself at the current mouse position',
position: {
my: 'top left',
target: 'mouse',
viewport: $(window), // Keep it on-screen at all times if possible
adjust: {
x: 10, y: 10
}
},
hide: {
fixed: true // Helps to prevent the tooltip from hiding ocassionally when tracking!
},
style: 'ui-tooltip-shadow'
});
这篇关于jquery工具提示/移动鼠标移动/工具提示鼠标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文