diff --git a/[core]/esx_notify/nui/js/script.js b/[core]/esx_notify/nui/js/script.js index 54c89967..64002521 100644 --- a/[core]/esx_notify/nui/js/script.js +++ b/[core]/esx_notify/nui/js/script.js @@ -57,8 +57,9 @@ notification = (data) => { } } + const id = Math.floor(Math.random() * Math.random()); const notification = $(` -
${data["message"]}
@@ -67,8 +68,16 @@ notification = (data) => { `).appendTo(`#root`); setTimeout(() => { - notification.fadeOut(70); - }, 10000); + document.getElementById(id).classList.remove("fadeIn"); + }, 300); + + setTimeout(() => { + document.getElementById(id).classList.add("fadeOut"); + + setTimeout(() => { + document.getElementById(id).remove(); + }, 400); + },data.length); return notification; };