Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (21 sloc) 977 Bytes


Purpose: Provides a lightweight plugin for the textarea tag that dynamically resizes based on its content that has no UI glitches or quirks.

MooTools 1.3 only!


Screenshot 1

How to use

DynamicTextarea is a reusable class that can by applied to any textarea tag on a page (with any sort of CSS styling attached to it) that allows it to dynamically resize based on the content it contains.


new DynamicTextarea(el,options);
//el: A dom node or id string.
//options: an object containing key:value pairs for configuring the class. Check the source for more details on available options

In Context:

new DynamicTextarea('myInput',{

This will ensure the textarea is always at least 2 rows tall.


Opera fails with certain CSS styles, so please test Opera and disable if necessary.