Hide native tooltip using jQuery

后端 未结 11 821
南旧
南旧 2020-12-01 05:00

Is there a way to hide the native tooltip action when a user hovers over a anchor tag with a title attribute? I don\'t want to remove it just don\'t display the nasty yellow

11条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 05:33

    var title;
    $('a[title]').hover(function () {
       title = $(this).attr('title');
       $(this).attr('title','');
    }, function () {
       $(this).attr('title',title);
    });
    

提交回复
热议问题