My JS is limited, and I am having trouble replicating <textarea> functionality I have seen in the Materialize framework (scroll to the <textarea> section).
I essentially want my <textarea> to expand smoothly based on the .val() of the <textarea>. Exactly like the example in the link I provided.
My code is below:
$('textarea').keyup(function() {
$(this).animate({height: 'auto'}, 250);
$(this).height(this.scrollHeight);
});
Thanks in advance.