【问题标题】:tooltipster not automatic close on hover工具提示器不会在悬停时自动关闭
【发布时间】:2017-04-27 08:28:54
【问题描述】:

如果用户单击“添加到”按钮,请使用工具提示器来显示反馈。工具提示器会在几秒钟后自动关闭。现在我需要一个解决方案,如果鼠标悬停在工具提示器上(悬停),则禁用自动关闭。这可能吗?

我的代码:

 $('.mgu-ekl-info').tooltipster({
            functionBefore: function(instance, helper){
                $.each($.tooltipster.instances(), function(i, instance){
                    instance.close();
                  });
            },
            contentCloning: true,
            timer: 2500,
            trigger: 'click',
            'maxWidth': 280,
            'minHeight': 280,
            animation: 'grow',
            interactive: true,
            arrow: false,
            distance: -10,
            contentAsHTML: true,
            theme: 'tooltipster-shadow'
        });

感谢您的帮助。

干杯 托马斯

【问题讨论】:

  • 您应该制作一个包含所有相关代码(css html jquery)的工作 sn-p,以便可以重现问题。这样我们就能更好地帮助您
  • 旁注:停止使用contentAsHTML,因为它在这里没用,阅读文档以了解它的用途。

标签: jquery tooltipster


【解决方案1】:

试试这个选项:delay: [300, 2500] 并删除 trigger: 'click',很明显。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多