首页 文章

为什么qTip工具提示保持打开状态,以便我可以点击它上面的链接?

提问于
浏览
3

这是我在jsfiddle中的example,将鼠标悬停在明尼苏达州以查看qtip弹出窗口 . 我正在使用qTip jquery插件,并且我仍然坚持让qtip保持足够长的时间,以便有人点击工具提示上的链接 . 我在scenerios上试过各种各样的东西让它保持开放 . 阅读documentation似乎很容易这样做,但我尝试了这些,没有运气 . 我试过这些

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

hide: { fixed: true, delay: 1000 }

还有很多其他的东西都不会保留工具提示,因此用户可以点击链接 . 令人恼火的是在reference页面上 . 如果你点击任何一个示例链接,他们正在做我想做的事情,我去了源,如果看起来他们正在使用

hide: 'unfocus',

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

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

2 回答

  • 6

    由于看起来您的小费位置偏向右侧,请尝试以下方法:

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

    Updated fiddle.

  • 1

    你的代码中有两种样式,它只是各种各样的不稳定 . 这是你的代码,工作 .

    http://jsfiddle.net/JDVTM/

相关问题