wikicr/public/js/base.js
Arthur Poulet f401385ae6
Some checks failed
continuous-integration/drone/push Build is failing
spike: add some public files
2021-10-15 18:46:18 +02:00

13 lines
381 B
JavaScript

function textarea_resize(select) {
select.each(function() {
this.setAttribute('style', 'height:' + (this.scrollHeight) + 'px;overflow-y:hidden;');
}).on('input', function() {
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
});
}
$(document).ready(function() {
textarea_resize($("textarea.textarea-resize"));
});