From 769d24b4b77a8f51c8ef63d14eed4255cad93783 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 1 Jun 2018 14:04:04 -0600 Subject: [PATCH] Improve alert fadeout --- static/js/app.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index b306fa5..445d69b 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -47,9 +47,12 @@ $(document).ready(function () { $("#msg-alert-box .alert").fadeTo(1000, 0.5); } if (msginteractiontick >= gone) { - $("#msg-alert-box .alert").fadeOut("slow", function () { - }); - window.clearInterval(msgticker); + setTimeout(function () { + if (msginteractiontick >= gone) { + $("#msg-alert-box .alert").fadeOut("slow"); + window.clearInterval(msgticker); + } + }, 1000); } }, 1000 * 1);