javascriptjquery-uionmouseoverjquery-ui-tooltipfocusin

JQuery-UI tooltip: enable only for mouseover, disable for focusin


Is it possible to make JQuery-UI tooltip open only on onmouseover but not on focusin event, to make it behave more like a native browser tooltip?

I tried this solution, but it didn't work:

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

Solution

  • This works:

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