- Posts: 41
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
$(document).on('ready pjax:scriptcomplete',function() { $('.with-auto-expand textarea').each(function(i) { handleTextAreaHeight(this); }); $(document).on('keyup change', '.with-auto-expand textarea', function() { handleTextAreaHeight(this); }); function handleTextAreaHeight(el) { $(el).css('min-height', 0); $(el).css('min-height', el.scrollHeight+'px'); } });
.with-auto-expand textarea { box-sizing: padding-box; overflow: hidden; resize: none; }