문제

How can I make the new JqueryUI tooltip visible only on focus: At the moment its on focus and on hover. I believe this is since JqueryUI 1.9

도움이 되었습니까?

해결책

A bit shorter way:

$(".selector").tooltip().off("mouseover mouseout");

다른 팁

This isn't ideal, but it should work:

$(".selector").tooltip({
    disabled: true
}).on("focusin", function () {
    $(this)
        .tooltip("enable")
        .tooltip("open");
}).on("focusout", function () {
    $(this)
        .tooltip("close")
        .tooltip("disable");
});

Basically, enable/open the tooltip on focusin and disable/close on focusout.

Example: http://jsfiddle.net/WmRuN/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top