Simple jQuery Dynamic Textarea Resizing Plugin - Expandify

Simple jQuery Dynamic Textarea Resizing Plugin - Expandify
File Size: 4.63KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Expandify is a dead simple jQuery plugin that automatically resizes & expands textarea height to make the textarea grow as based on newlines in the user's input. The plugin accepts a maxRows option to limit the maximum number (default to 5) of rows when user input.

See also:

How to use it:

1. Make sure to load jQuery expandify plugin after jQuery javascript library loaded.

<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="jquery.expandify.js"></script>

2. Create a starndard Html textarea

<textarea placeholder="Type or paste here to expand textarea"></textarea>

3. Call the plugin. And set the maximum number of rows to 10

<script>
$(function()
{
$('textarea').expandify(10);
});
</script>

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