From 708594d32ffe779cf547c816fa7cdd19d095be2e Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 20 May 2024 17:11:38 -0400 Subject: v2 done --- src/public/js/lib.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/public/js') diff --git a/src/public/js/lib.js b/src/public/js/lib.js index 95f83b7..4d08bab 100644 --- a/src/public/js/lib.js +++ b/src/public/js/lib.js @@ -94,6 +94,13 @@ var errorToast = (msg) => { }) } +var successToast = (msg) => { + let url = '/template/toast?type=success&msg=' + msg; + $.get(url, function (data) { + $('#toast-container').prepend(data); + }) +} + $$('.action-close-toast').on('click', function() { $(this).parent().remove(); }); -- cgit v1.2.3-freya