I have binded jQuery hover to many elements on my page, and when I move mouse rapidly, hove will not cat开发者_如何转开发ch all events that should be fired. Is there any workaround for this "feature"?
It's a deeper problem than you think. When you move the mouse rapidly, it doesn't exist on all points along the path from a to b, and will skip over pixels.
I don't know of any way to interpolate the data from the mouse position and send that to jQuery as a sequence of hover events, but that would be what you'd have to do to make this work the way you expect it to.
This mouse rate checker might give you a bit more insight into the problem.
Bind "hover" to one big 'canvass' element - something that contains all the rest, then analyze the coordinates and elements it should have hit on route between the event firing. This is a horrible work (you need to create a map of all active elements and use vector crossing finding algorithms to find intersections of route and elements) but about the only that will work. Otherwise, just reduce the number of elements with the event or redesign the interface... or use a faster computer (all clients).
HoverIntent jQuery plugin solved my issue. Thanx for all answers!!!
http://cherne.net/brian/resources/jquery.hoverIntent.html
精彩评论