From da986f4097c80bc063d36a797a5c9dccb1eb8b83 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Thu, 28 Mar 2024 17:04:54 -0500 Subject: [PATCH] Update jquery.charcount.js --- src/js/jquery.charcount.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/js/jquery.charcount.js b/src/js/jquery.charcount.js index a270542..0e9ba07 100644 --- a/src/js/jquery.charcount.js +++ b/src/js/jquery.charcount.js @@ -58,12 +58,12 @@ this.each(function () { $(this).after('<' + options.counterElement + ' aria-live="polite" aria-atomic="true" class="' + options.css + '">' + options.counterText + ''); 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 ); + }); }); };