views:

257

answers:

1

Various experiments I've carried out indicate that there is no foolproof way of responding to a 'mouseleave' event using jQuery. Two actions appear to not trigger any relevant event:

  1. Moving the pointer away from an element very quickly
  2. Moving the pointer off the element via some browser chrome (or out the the window entirely)

The second is by no means a show-stopper, but the first is a big problem. Is there a solution? Tracking document.mousemove and continually checking whether the cursor is over the target element?

+1  A: 

i usually use hoverintent instead of hover to solve problems like this.

Funky Dude