jQuery Plugin For Auto Grow Of Textarea On Typing - autoresize

File Size: 40.2 KB
Views Total: 2504
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin For Auto Grow Of Textarea On Typing - autoresize

Just another jQuery plugin for auto scaling textareas that dynamically adjust the height of the normal textarea element to fit its content. Supports both user type and paste events.

How to use it:

1. Place the minified version of the jQuery autoresize plugin after jQuery library:

<script src="//code.jquery.com/jquery-3.1.0.slim.min.js"></script>
<script src="dist/jquery.autoresize.min.js"></script>

2. Just call the function on the exiting textarea element and done.

$('textarea').autoResize();

3. Limit the max/min rows as this:

$('textarea').autoResize({
  'minRows': 1,
  'maxRows': 0
});

This awesome jQuery plugin is developed by kipruss. For more Advanced Usages, please check the demo page or visit the official website.