textarea content based height increase

The typing the textarea  content to increase the height of the textarea

<div id="moveable-content "> <textarea   class=" textarea-editer " id="write_content" style=""></textarea></div>

In the  normal typing the textarea height increased width in the scroll bar but inthis function increased the textarea height with no scroll


$('#moveable-content').on('change click keyup keydown paste cut', 'textarea', function () {
     jQuery('#moveable-content').css({'height': this.scrollHeight });


Leave a Reply

Your email address will not be published. Required fields are marked *