Auto-Growing Textarea Demo

This script requires jQuery 1.2.2.

Type below and the textarea will shrink/grow just as it does on Facebook. View Source to acquire the appropriate CSS styles.

Download jquery.autogrow-1.2.2.zip

min-height of 84px
No min-height, max-height of 100
min-height of 100px, prefilled

Optional Textarea CSS Attributes

-- OR --

You can apply the attributes (optional) using jQuery, which is the best option if you want to apply the same attributes to multiple textareas:

$(document).ready (function() {

$('textarea.expanding').autogrow({ maxHeight: 100, minHeight: 30, lineHeight: 16 });

});

Note: If your textarea gets deselected or acts funny, it is fixed in jQuery 1.2.2. The latest version can always be downloaded from here: http://code.jquery.com/jquery-latest.js