title: my autogrowing textarea doesn't auto minimize
body: <p>an easy one for some of you. I found some code to make it autogrow but not automin. The reason I want to use my own code is because if i use a plugin it might not get updated for newer jQuery and i don't need a crazy amount of options (accompanied by extra code for them)... and for my current application i cannot risk it.</p>
  
  <pre><code>$('textarea').keydown(function(e){
    e.e=$(this);e.h=e.e[0].scrollHeight,e.e.css('height','24px');
    e.e.css('height',e.h),e.e.css('max-height',e.h)
  });
  </code></pre>
  
  <p>it grows just fine, but it does not work when i remove characters. I am not sure what I am doing wrong. To me it seems the <em>scrollHeight</em> is not being adjusted once characters are removed.</p>