How to auto resize textarea like facebook using jquery

It's only fair to share...Share on Facebook0Share on Google+0Tweet about this on Twitter0Share on LinkedIn0Pin on Pinterest1Digg thisShare on StumbleUpon6

auto resized jquery

In Facebook textarea resized based on the content. There are lots of jQuery plugin through which we can achieve this. Here we will discuss on autoResize jQuery plugin. AutoResize plugin resize the textarea automatically on the fly based on the contents which we are putting same like Facebook.

How plugin works?
When the textarea content is modified, this plugin put it on a hidden div having same CSS properties as the textarea. Then, we calculate the height of hidden div, and apply it to the textarea.

index.html (with default options)

index.html (With maximal height options)


Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">