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();
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();