javascript - 为什么 qTip 工具提示不保持打开状态以便我可以单击它的链接?

标签 javascript jquery jquery-plugins qtip

这是我的 example在 jsfiddle 中,将鼠标悬停在 Minnesota 上以查看 qtip 弹出窗口。我正在使用 qTip jquery 插件,我一直坚持让 qtip 停留足够长的时间,以便有人单击工具提示上的链接。我已经尝试了各种场景以使其保持打开状态。阅读documentation这样做似乎很容易,但我尝试了这些但没有运气。我试过这些

hide: { when: 'mouseout', fixed: true }

hide: { fixed: true, delay: 1000 }

和许多其他人一样,没有任何东西可以使工具提示保持打开状态,以便用户可以单击链接。令人恼火的是 reference页。如果您单击任何示例链接,他们正在做我想做的事情,我去了源代码,如果他们似乎正在使用

  hide: 'unfocus',

     hide: {
        fixed: true,
        delay: 240
     },

但我都试过了,工具提示不会保持打开状态。我错过了什么吗?

最佳答案

由于提示的位置似乎偏右了一些,请尝试以下操作:

  $(this).qtip(
  {
      hide:{ //moved hide to here,
        delay:500, //give a small delay to allow the user to mouse over it.
        fixed:true
      },
     content: $("." + test).html(),
     style: {
        name: 'dark',
         style: {
            border: 1,
            cursor: 'pointer',
            padding: '5px 8px',
            name: 'blue'
         },
        border: {}, 
        tip: true // Apply a tip at the default tooltip corner
     }
  });

已更新 fiddle .

关于javascript - 为什么 qTip 工具提示不保持打开状态以便我可以单击它的链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5459844/

相关文章:

javascript - 有没有办法使用 javascript 或 Jquery 找出某人计算机上屏幕的宽度?

javascript - 在调用 setState 之前 react : why state change when try to change it in immutable way ,

jquery - 如何以编程方式关闭打开的 jquery.reveal.js 模式框?

javascript - jQuery Javascript 大规模应用程序开发

jquery - 使用 jquery 暂停和恢复动画

javascript - 如何为点击事件实现 Omniture 自定义链接跟踪?

javascript - ext js 这个参数

javascript - 如何使用 Sweet Alert 确认提交表单?

javascript - Jquery数组通过ajax发送到php

javascript - 如何确定数据表中的行是否可见