Advertisement
codecaine

JQUERY autosize the height of textarea when the user clicks on it

Jul 2nd, 2021
2,434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.10 KB | None | 0 0
  1. $('#textareaID').on('click', function() {
  2.     $(this).height(0);
  3.     $(this).height(this.scrollHeight);
  4. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement