Added dismissable notifications

- Bootstrap alert
- Can close manually
- Also set to disappear after configurable time
This commit is contained in:
Oliver committed 2018-04-29 23:29:38 +10:00
1 parent 006aa69dbb
commit b6665ec2a7
3 files changed
+26

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
function showAlert(target, message, timeout=5000) {
$(target).find(".alert-msg").html(message);
$(target).show();
$(target).delay(timeout).slideUp(200, function() {
$(this).alert(close);
});
}