How to solve this hover out issue

后端 未结 2 1363
旧时难觅i
旧时难觅i 2020-12-22 05:10

I am trying to apply a hover in and hover out effect on a button and a div will popup above the hovered button. The popup div will disappear if user hover out of the button.

2条回答
  •  余生分开走
    2020-12-22 05:32

    Try:

    $('.helpImg').css({'cursor': 'pointer'}).hover(function(){
        $('#tool').show(150);
    }, function (){
        $('#tool').not(':visible').hide(50);
    });
    
    $('#tool').mouseout(function(){ this.style.display = 'none'; })     
    

提交回复
热议问题