Last active
April 8, 2018 11:25
-
-
Save Dexdot/719b62aa876f0fa7e822ced0ff578a08 to your computer and use it in GitHub Desktop.
Textarea autosize (height content)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.container').on('change keyup keydown paste cut', 'textarea', function() { | |
| $(this).height(0).height(this.scrollHeight); | |
| }).find('textarea').change(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment