Script of the Day: elasticize.js

jQuery plugin to automatically expand textareas to the content they hold

  jQuery plugin to automatically expand textareas to the content they hold
elasticize.js is a very small but useful jQuery plugin to make textareas grow in size so the content typed inside them always fits.

elasticize.js is a very small but useful jQuery plugin to make textareas grow in size so the content typed inside them always fits.

We are all obsessed with technology. So when you spend between 100 and 200 dollars or euros on a wide screen 23+” PC monitor and you access a site and there's a contact form with a textarea of 150 pixels wide you just want to pull your hair out.

As a developer, this should be embarrassing for you. Textareas should never be as big as half a teabag.

Entering text inside a textarea should be fluid and the textarea should expand as the user types text into it.

Elaticize does this for developers. It helps them look professional by providing a textarea that never annoys the user. The textarea will always grow to the text size and when the user focuses the cursor into it, it will also add some additional lines under the last line just for the sake of positive whitespace.

If elasticize.js is something you may want to use and even expand on its principles, you can fork the code on GitHub and code away into the sunset.

Download elasticize.js from our Scripts section here.

Comments

By    3 Dec 2012, 17:01 GMT