javascript - 延迟 qTip 关闭

标签 javascript jquery qtip

如何延迟 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/

相关文章:

javascript - 如何存储 Ti.UI.createSlider() 的值;和 Ti.UI.createSwitch();?

javascript - 如何更改第一 View 位置

javascript - 使 Accordion 的整个标题部分可点击

jquery 工具在 IE8 中覆盖掩码

jQuery qTip 在 jquery-1.4.2 下不起作用?

jquery - 在 qTip 中获取箭头

javascript - 从数组 React 中删除项目?

javascript - 在一个 Jquery.queue 的最后一个效果结束时执行一个函数

javascript - 使用图标更改占位符文本

jquery - qTip2使用ajax定位