I have a list of several 'triggers' (<li>s
), each trigger shows a specific div, and each div has a 'close' button.
Now, I want to improve the usability by adding a timer/delay to the opened/visible div so that after 3 or 5 seconds after the user has moved their mouse away from the trigger, the opened/visible div fades out.
The problem I'm having right now, is that whenever I add a function with .mouseleave()
, the opened/visible div hides as soon as the mouse leaves the trigger area.
However, if you remove the function, then the div stays visible and you're able to close it by clicking the close button.
Here's a [FIDDLE/DEMO] 1 of my situation.
Any help would be greatly appreciated.
Thanks.