jquery slideUp on click, stopped on hover reset on mouseleave
问题 I have a div that opens when a button is clicked by using $(element).slideDown(); I'm trying to do three things, If the mouse is over the element it stays open If the mouse leaves the element it slideUp() after 5 seconds If the mouse never hovers the element slideUp() after 5 seconds What I did was to give the div a class of notHovered. On the button click the container slides down and the time starts on the condition ".intro-wrapper" has the class "notHovered". What I then did was remove