How can I determine start and stop points for mouse cursor?
问题 Let's say the user starts to move mouse and stop at somewhere on the browser. How can I determine start and stop point with Javascript/Jquery ? Start point is easy, I can get it with mousemove event but what about stop point ? I can't use mouseenter or mouseleave events because my playground is window or document itself. Thank you. 回答1: using a combination of setTimeout and clearTimeout. If the user doesn't move for x amount of seconds then it means that he stopped. Here I wrote you an