Skip to content

cparkko/textarea-autoresize-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

textarea-autoresize-js

jQuery plugin
Plugin can resize textarea field when user type some text

options

width - width of hidden container, must be equal to textarea width (default: outerWidth)
height - minimum height of hidden container (default: outerHeight)

methods

refresh - update height of textarea

sample

<script type="text/javascript" src="/path/to/textarea-autoresize-js.js"></script>
<script type="text/javascript"> $('textarea').autoresize({ width: 400, height: 200 }); </script>

sample 2

$('textarea').autoresize('refresh');

example

https://jsfiddle.net/fr03bya0/