load later

This commit is contained in:
j 2025-03-24 15:43:47 +00:00
parent a3f32323b1
commit 99a37b946a

View file

@ -1,4 +1,5 @@
django.jQuery(function() { window.addEventListener("load", function() {
django.jQuery(function() {
django.jQuery('textarea[maxlength]').each(function(i, textarea) { django.jQuery('textarea[maxlength]').each(function(i, textarea) {
var t = django.jQuery(textarea), var t = django.jQuery(textarea),
count = t.parent().find('.maxlength-count') count = t.parent().find('.maxlength-count')
@ -15,4 +16,5 @@ django.jQuery(function() {
count.html(left + ' characters left. (max: ' + max + ')') count.html(left + ' characters left. (max: ' + max + ')')
} }
}); });
}); });
})