如何使用光标移动qtip工具提示

我正在使用js库qtip工具提示。 当我将鼠标hover在表格中的hover行上时,我想使用我的光标移动qtip工具提示。 我知道如何使用我的光标移动自己的工具提示,但我正在努力使用qtip。 请解释你回答的代码。 谢谢

我的HTML:

Total Credits

我可以使用以下jquery代码创建一个普通的工具提示(没有qtip js lib)来跟踪我的光标

 $(document).ready(function() { $('.hover').mousemove(function(e) { var hovertext = $(this).attr('hovertext'); $('#hoverdiv').text(hovertext).show(); $('#hoverdiv').css('top', e.clientY+10).css('left', e.clientX+10); }).mouseout(function() { $('#hoverdiv').hide(); }); }); 

以及显示静态qtip工具提示的代码:

 $(document).ready(function() { $('.hover').each(function() { $(this).qtip({ content: $(this).attr('hovertext') }); }); }); 

这是我到目前为止所尝试的:

 $(document).ready(function() { $('.hover').mousemove(function(e) { $(this).qtip({ content: $(this).attr('hovertext') }); $('').css('top', e.clientY+10).css('left', e.clientX+10); }); }); 

根据qTip文档

当position.target设置为mouse时,此选项确定将鼠标hover在show.target上时工具提示是否跟随鼠标。

例:

 $('.selector').qtip({ content: { text: 'I follow the mouse whilst I\'m visible. Weeeeee!' }, position: { target: 'mouse', adjust: { mouse: true // Can be omitted (eg default behaviour) } } }); 

还有一个jsFiddle的例子