Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 723 Bytes

README.md

File metadata and controls

32 lines (27 loc) · 723 Bytes

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/