Skip to content

A pure javascript function that gives the ability for a textarea to automatically grow and shrink dynamically with its content

License

Notifications You must be signed in to change notification settings

dimboiu/autogrow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

autogrow

A minimal/pure javascript function that gives the ability for a textarea to automatically grow and shrink dynamically with its content.

Currently works for new lines only (.\n').

Instructions

Include the script in your page:

<script src="path/to/autogrow.js"></script>

Initialize the script using the textarea id:

var t = Autogrow('mytextarea');

You're done!

PS: You can use multiple variables to initiate multiple textarea's on the same page:

var t1 = Autogrow('mytextarea1');
var t2 = Autogrow('mytextarea2');
...

Feel free to do anything you want with this script.

*Use at your own risk

About

A pure javascript function that gives the ability for a textarea to automatically grow and shrink dynamically with its content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published