title: Cannot set rows for textarea once you set the scrollHeight
body: <p>After hours of trying to figure out where I went wrong, I finally found out that you cannot set the rows of the textarea once you set the scrollHeight for the textarea. Why is that happening, and how would we fix it?</p>
  
  <pre><code>&lt;?php
  include("ajaxLink.php");
  ?&gt;
  
  &lt;textarea id = 'textarea' cols = '30' rows = '3' onkeydown = "changeIt()"&gt;
  text text text text text text text text 
  text text text text text text text text 
  text text text text text text text text 
  text text text text text text text text 
  text text text text text text text text 
  text text text text text text text text 
  text text text text text text text text 
  text text text text text text text text 
  text text text text text text text text 
  &lt;/textarea&gt;
  
  &lt;script&gt;
  
  //******************************************************************
  
  function changeIt() {
  
  $('#textarea').height($('#textarea')[0].scrollHeight); 
  document.getElementById('textarea').rows = 1000; 
  
  } //end of function changeIt()
  //******************************************************************
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Obviously, this isn't the actual function that I'm using, and it's just here to serve as an example to prove that setting the rows of the textarea doesn't work after setting the scrollHeight.</p>