Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Removing the element being hovered prevents all future hoverenter #64
See http://jsfiddle.net/qAFSX/3/. Remove an element that is being hovered, and nothing will ever be hovered again.
An easy partial fix is to have the hover plugin bind to destroyed and mouseleave, although there is still some weird behavior if the element is detatch()ed, and if the element is not reattached, no hover events will trigger until it is.
If the mouse has entered a new element, this change forces the hoverleave event to fire on the previously hovered element, even if no mouseleave event fires. The mouseleave event will not fire if the element is removed while hovered and possibly in other circumstances.