When you hover over an item, my site creates a tooltip. When the mouse stops hovering over the element, the mouseout event is fired, the tooltip is deleted, and everything is correct with the world. Except that sometimes the user moves his mouse so fast that by the time the tooltip has been created, the mouse is no longer inside the element. This means that the tooltip does not disappear if the user does not flip over and exit the item.
My solution, after creating a tooltip, check if the mouse is above the desired item, and if not, delete it. Unfortunately, I do not know how.
I tried these solutions, but they both require the mouseout event to work. Am I missing something, or is there another (hopefully better) way to find if the mouse is not currently over an element?
source
share