From 98ad13fc0734d4b90374293b363aad79902a6896 Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Thu, 19 Jun 2014 14:27:06 -0700 Subject: [PATCH] Fix extra after_close callback when removing notification via gritter.remove --- js/jquery.gritter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/jquery.gritter.js b/js/jquery.gritter.js index 3587ac5..a8ef14a 100755 --- a/js/jquery.gritter.js +++ b/js/jquery.gritter.js @@ -201,6 +201,8 @@ // Remove it then run the callback function e.remove(); this['_after_close_' + unique_id](e, manual_close); + // Make sure timer is cleared (when called via gritter.remove) + clearTimeout(this['_int_id_' + unique_id]); // Check if the wrapper is empty, if it is.. remove the wrapper if($('.gritter-item-wrapper').length == 0){