title: How to stop/override a Jquery TimeOut function?
body: <p>I have a small jquery snippet that displays notification message at the top of the screen in response to user actions on a page. The notification is often displayed after Ajax actions with dynamic content inside it.</p>
  
  <p>For example:</p>
  
  <pre><code>$("#mini-txt").html("Thank you!");
  $("#mini").fadeIn("fast");
  setTimeout(function() {$("#mini").animate({height: "hide", opacity: "hide"}, "medium");}, 3000);
  </code></pre>
  
  <p>The notification works well, except when a user does two or more actions in rapid succession, in which case the TimeOut function will confuse itself and the second message appears to come inside the previous 3000 milliseconds.</p>
  
  <p>Is there a way to "kill" the previous notification if a new action is performed. I've got no problem with the actions/selectors, just the TimeOut function.... either stopping it or overriding it somehow. Or perhaps there's a better alternative for getting the message to linger on the screen for a few seconds before disappearing?</p>
  
  <p>Thank you.</p>