Skip to content

Commit

Permalink
Update jquery.charcount.js
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Mar 28, 2024
1 parent b4afbcc commit da986f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/js/jquery.charcount.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
this.each(function () {
$(this).after('<' + options.counterElement + ' aria-live="polite" aria-atomic="true" class="' + options.css + '">' + options.counterText + '</' + options.counterElement + '>');
calculate(this);
$(this).on( 'keyup', delay( function(e) {
calculate(this);
}, 200 ));
$(this).on( 'change', delay( function(e) {
calculate(this);
}, 200 ));
$(this).on( 'keyup', function(e) {
setTimeout( calculate(this), 200 );
});
$(this).on( 'change', function(e) {
setTimeout( calculate(this), 200 );
});
});

};
Expand Down

0 comments on commit da986f4

Please sign in to comment.