title: Jquery mouseleave delay
body: <p>Got a simple problem, which it doesn't look like HoverIntent would solve.</p>
  
  <p>I have 2 elements (lets say a button and a div), 1 element is the trigger to start the div expanding, which is triggered by a mouseenter event (this would be a suitable candidate for HoverIntent).</p>
  
  <p>However when the mouse leaves the expanded div for a given amount of time I need it to contract again, however if they re-enter the div it should NOT contract. Most hoverintent style plugins would give me this functionality but only for 1 element, and as one element controls the expanding (button - mouseenter) and one controls the contracting (div - mouseleave).</p>
  
  <p>I know I could write some code to just do a setTimeout to delay for a period and make sure that the mouse is still outside of the area, but I would rather use a pre-made plugin if one exists.</p>
  
  <p>So could anyone advise if this exists?</p>
  
  <p>-- Edited --</p>
  
  <p>Edited the above question to make clear that the main intent part is to stop it contracting the div if the mouse re-enters the div within a given amount of time, lets say 2 seconds. So the div should expand on mouseenter button, then contract if mouseleaves the div for >= 2 seconds.</p>