我对qtip还比较陌生,到目前为止,它的实现看起来很棒。
我试图设置我的联系人有一个像Gmail一样的鼠标器,当你将鼠标移到一个联系人上时,会显示他们的图片和特定的操作。
我现在动态地加载代码,将位置目标设置为鼠标,并将隐藏设置为fixed:true。
但当我移动鼠标时,工具提示也会移动,我需要它静止不动,这样我就可以单击工具提示内的操作。
这就是我目前为止所拥有的。
$(document).ready(function(){
// Use the each() method to gain access to each of the elements attributes
$('.contact').each(function()
{
$(this).qtip(
{
content: {
method: 'GET',
url: 'testData.php',
data: {
id: 1
}
},
position: { target: 'mouse',
adjust: { screen: true, scroll: true } },
show: {
delay: 700,
solo: true
},
hide: {
fixed: true, // Make it fixed so it can be hovered over
when: 'mouseout'
},
style: {
padding: '5px 15px', // Give it some extra padding
name: 'light' // And style it with the preset dark theme
}
});
});
});
任何帮助都将不胜感激!!