Mouse swiping speed is too fast, mouseenter or mouseover events cannot be monitored in time

ask for help
element margin sets 200px, that is, offsetleft and offsettop are 200px
legend, when my mouse slips in from above and triggers mouseenter, the detected mouse position is not the edge of the element
ask for a positive solution

$(".block").on("mouseenter", function () {
    var e = event || window.event;
    cliX = e.clientX;
    cliY = e.clientY;
    console.log("X" + cliX);
    console.log("Y" + cliY);
})
Jul.11,2022

you print the offsetleft and offsettop values of card1 before the mouseenter event to see if it is 200px


. Do you have any special needs?

Menu