on link hover display div when leave cursor form div and link hide div jquery

前端 未结 1 362
不思量自难忘°
不思量自难忘° 2021-01-24 01:49

I have link and on hover it should display the div when leave cursor form div and link it should hide div.

 

        
相关标签:
1条回答
  • 2021-01-24 02:32

    Updated as per your comments:

    $("#show_div").hover(function(){
         $("#dropcart").fadeIn();
    });
    
    $("#dropcart").mouseleave(function(){
        if($("#show_div").is(':hover') === false)
        $("#dropcart").fadeOut("fast"); 
    });
    

    demo

    0 讨论(0)
提交回复
热议问题