像 gMail 联系人一样 qTip 鼠标悬停
我对 qTip 相当陌生,到目前为止,实施起来看起来很棒。
我正在尝试将我的联系人设置为像 Gmail 一样,当您将鼠标悬停在联系人上时,鼠标悬停会显示他们的图片和特定操作。
我目前将代码动态加载,位置目标设置为鼠标,并将隐藏设置为固定: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
}
});
});
});
任何帮助将不胜感激!
I am fairly new to qTip and so far things look awesome for implementing.
I am trying to setup my contacts to have a mouseover like gmail has when you mouse over a contact is shows their picture and specific actions.
I currently have the code loading dynamically with the position target set to mouse, and have the hide set to fixed:true.
But when I move the mouse the tooltip moves too, and I need it to stand still so I can click on actions inside the tooltip.
This is what I have so far.
$(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
}
});
});
});
Any help would be appreciated!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了,我要补充的是:
Found it, all I had to add was this: