Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/schneidmaster/textareaexpander


https://github.com/schneidmaster/textareaexpander

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

## TextAreaExpander plugin for jQuery
### v1.0
Expands or contracts a textarea height depending on the
quatity of content entered by the user in the box.

By Craig Buckler, Optimalworks.net

As featured on SitePoint.com:
http://www.sitepoint.com/blogs/2009/07/29/build-auto-expanding-textarea-1/

Please use as you wish at your own risk.

### Usage:

From JavaScript, use:
$().TextAreaExpander(, );
where:
is the DOM node selector, e.g. "textarea"
is the minimum textarea height in pixels (optional)
is the maximum textarea height in pixels (optional)

Alternatively, in you HTML:
Assign a class of "expand" to any tag.
e.g.

Or assign a class of "expandMIN-MAX" to set the minimum and maximum height.
e.g.
The textarea will use an appropriate height between 50 and 200 pixels.