qTip mouseover like gMail contacts
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(){
开发者_如何学C // 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!!
Found it, all I had to add was this:
position: {
target: 'mouse',
adjust: { screen: true, scroll: true, mouse: false }
},
精彩评论