You can use the more common mouseover / mouseout events to get a freeze event that doesn't fire when the mouse moves internally.
But do not use toggle in a mouse event, this can easily go wrong if, for example. the mouse is over the element while the page is loading, or the mouse leaves the browser (which may allow the mouse to leave the borders of the element without launching mouseout ). Separate the function for over , which shows the content, and out , which hides it.
Better: Use the hover() method, which is designed specifically for this purpose.
source share