JavaScript for textarea post

/ Published in: JavaScript
Save to your folder(s)

JavaScript for a blog post on creating styled mobile textareas

Copy this code and paste it in your HTML
  1. function resizeTextArea(){
  2. var content = document.querySelector("#notes_content");
  3. var container = document.querySelector("#notes_content_hidden");
  4. container.innerText = content.value;
  5. = container.offsetHeight + "px";
  6. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.