如何延迟关闭qTip2插件,以便用户可以单击工具提示中的链接?当您将鼠标悬停在我网站上的电子邮件地址上时,我想链接到社交网络。

最佳答案

请参阅文档中的hide.fixed和hide.delay属性:

http://craigsworks.com/projects/qtip2/docs/hide/#fixed


  hide.fixed:设置为true时,如果鼠标单击,工具提示将不会隐藏
  结束,允许单击内容并进行交互。
  注意:启用此功能后,通常会添加隐藏延迟
  让用户有时间在隐藏之前将鼠标悬停在工具提示上。


http://craigsworks.com/projects/qtip2/docs/hide/#delay


  hide.delay:延迟隐藏的时间(以毫秒为单位)
  在hide.target上触发hide.event时的工具提示


$('.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
   }
});

10-04 22:33
查看更多