autogrow.js
Automatically grows and shrinks textboxes with your content as you type.
by aliaksej
HTML
<textarea></textarea>
CSS
textarea { margin: 1em; outline: none; }
JavaScript
$('textarea').on('input', function() {
if (this.scrollHeight !== this.clientHeight) {
this.style.height = this.scrollHeight + 'px';
}
})