A minimal/pure javascript function that gives the ability for a textarea to automatically grow and shrink dynamically with its content.
Currently works for new lines only (.\n').
Include the script in your page:
<script src="path/to/autogrow.js"></script>
Initialize the script using the textarea id:
var t = Autogrow('mytextarea');
You're done!
PS: You can use multiple variables to initiate multiple textarea's on the same page:
var t1 = Autogrow('mytextarea1');
var t2 = Autogrow('mytextarea2');
...
Feel free to do anything you want with this script.
*Use at your own risk