【问题标题】:JQuery-UI tooltip: enable only for mouseover, disable for focusinJQuery-UI 工具提示:仅对鼠标悬停启用,对焦点禁用
【发布时间】:2019-05-30 22:39:49
【问题描述】:

是否可以让 JQuery-UI 工具提示仅在 onmouseover 上打开而不在 focusin 事件上打开,使其表现得更像原生浏览器工具提示?

我尝试了这个解决方案,但没有奏效:

$(document).tooltip({
    items:".jquery-tooltip",
    track:true, show:false, hide:false,
    open: function(event, ui) {
        if(event.originalEvent.type == "focusin") {
            $(document).tooltip("close");
        }
    },
    content: function() {
        return "tooltip text here";
    }
});

【问题讨论】:

    标签: javascript jquery-ui onmouseover jquery-ui-tooltip focusin


    【解决方案1】:

    这行得通:

    $(document).tooltip().off("focusin focusout");
    

    【讨论】:

      猜你喜欢
      • 2021-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-22
      • 2022-01-06
      • 1970-01-01
      相关资源
      最近更新 更多