如何延迟 qTip2 插件关闭,以便用户可以单击工具提示中的链接?当您将鼠标悬停在我的网站上的我的电子邮件地址上时,我希望获得社交网络的链接。
最佳答案
请参阅文档中的 hide.fixed 和 hide.delay 属性:
http://craigsworks.com/projects/qtip2/docs/hide/#fixed
hide.fixed: When set to true, the tooltip will not hide if moused over, allowing the contents to be clicked and interacted with. Note: Adding a hide delay is generally done when this is enabled to give the user time to mouseover the tooltip before hiding.
http://craigsworks.com/projects/qtip2/docs/hide/#delay
hide.delay: Time in milliseconds by which to delay hiding of the tooltip when the hide.event is triggered on the hide.target
$('.selector').qtip({
content: {
text: $('<a href="http://google.com">Visit Google</a>'),
},
hide: {
fixed: true, // Let the user mouse into the tip
delay: 500 // Don't hide right away so that they can mouse into it
}
});
关于javascript - 延迟 qTip 关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7382213/