Joined February 2015
·

Techy Gypo

England
·
·

Posted to Resize Textarea to fit Content over 1 year ago

Excellent thanks :)
I have tweaked this a little to use it as an extension:

$.fn.extend({
autoresize: function () {
$(this).on('change keyup keydown paste cut', function () {
$(this).height(0).height(this.scrollHeight);
}).change();
}
});

$('#mytextarea').autoresize();

Achievements
1 Karma
0 Total ProTip Views