Yes, this is normal behavior. The path to it may be to discard the mouse element / mouse and bind the mousemove event to the document. From there, find the location of the mouse pointer on the page and offset (), with () and height () of the animated element. If the last point saved from the mousemove event falls inside this area, your mouse is in the element.
You will need to test it every time you update the animation, which you can do using the animated step function .
eg.
function myAnimateStepFunc(e,fx) {
var $e = $(fx.elem);
var p = $e.offset();
var isin = false;
if(lastx >= p.left && lasty >= p.top) {
isin =(lastx < p.left + $e.width() && lasty < p.top + $e.height());
}
...
This may be enough, although you can extend it to then trigger mouseleave / mouseenter events aimed at the animation element.
, mousemove , , , div .