Add close button to alert window
@@ -192,9 +192,10 @@ function customAlert(alertTitle, alertMessage, alertType, duration) {
el.setAttribute("style", style);
el.setAttribute("class", "custom-alert shadow-md " + alertTypes[alertType].class);
- alertMessage = '<i class="' + alertTypes[alertType].icon + '" aria-hidden="true"></i><strong> '
- + alertTitle + '</strong><br>' + alertMessage
- + "<div class='alert-progress'></div>";
+ alertMessage =
+ '<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' +
+ '<i class="' + alertTypes[alertType].icon + '" aria-hidden="true"></i><strong> '
+ + alertTitle + '</strong><br>' + alertMessage;
el.innerHTML = alertMessage;
setTimeout(function () {
$(el).fadeOut(300, function () {
