jQuery: How to check if the mouse is over an element

前端 未结 6 2024
庸人自扰
庸人自扰 2021-01-11 13:16

I have a deferred function that binds a mouseenter event:

$(window).load(function(e) {
  var $container = $(\'.container\');
  $container.mouseenter(function         


        
6条回答
  •  星月不相逢
    2021-01-11 13:27

    I went with the css hover solution in Detect mouse hover on page load with jQuery because it doesn't require the mousemove event.

提交回复
热议问题