function flexibleTextarea(){ var _txt = document.getElementById('comment'); // comment is id of text area, that you want to expand var _minRows = 7; // height of field (number of rows) if (_txt) { function setRows() { _txt.rows = _minRows; do { if (_txt.clientHeight != _txt.scrollHeight) _txt.rows += 1; } while (_txt.clientHeight < _txt.scrollHeight); } setRows(); _txt.rows = _minRows; _txt.onkeyup = function(){ setRows(); } } } if (window.addEventListener) window.addEventListener("load", flexibleTextarea, false); else if (window.attachEvent) window.attachEvent("onload", flexibleTextarea);
Good design is good business. Start your project today

OUR WEBSITE IS GETTING A REFRESH!

We may be under construction, however we are still all ears. If you have any questions, enquiries, or are wanting a general chat, get in touch to see how Nomad Studios can ensure your business is best supported.

Email hello@nomadstudios.co.nz, or fill out the form below.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.