jquery-plugin-orAutoheight.min.js (291B)
1 import $ from "../jquery-global.min.js"; 2 export default function() { 3 let resize = function( element ) 4 { 5 let lines = $(element).val().split("\n").length; 6 $(element).attr('rows',lines+3); 7 }; 8 $(this).each(function(i) 9 { 10 resize(this); 11 }); 12 return $(this).keypress(function() 13 { 14 resize(this); 15 }); 16 };