title: jquery add delay to animation
body: <p>I am trying to add a delay to my Jquery so that once the mouse leaves my div id=test it will wait 3000 ms before closing back up. It doesnt seem to be working however?</p>
  
  <p>I am using Jquery 1.6.min</p>
  
  <p>Thank you in advance for your help and code snippets</p>
  
  <pre><code>$("#test").hover(function() {
      $(this).css({'z-index' : '10'});
      $(this).addClass("hover").stop()
          .animate({
              height: '60px'
          }, 1500);
  
      } , function() {
      $(this).css({'z-index' : '0'});
      $(this).delay(3000);
      $(this).removeClass("hover").stop() 
          .animate({
              height: '20px'
          }, 1500);
  });
  </code></pre>