Auto dismissal for info and error notifications

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2017-10-22 15:07:17 +02:00
parent 1cbd2ea9bd
commit 618a046b64

View File

@@ -199,3 +199,17 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) {
window.location.hash = e.target.hash;
window.scrollTo(0, 0);
});
// Auto dismissal for info and error notifications
$(document).ready(function(){
var alInfo = $("#alInfo");
var alError = $("#alError");
if(alInfo.length)
{
alInfo.delay(1000).fadeOut(2000, function() { alInfo.hide(); });
}
if(alError.length)
{
alError.delay(1000).fadeOut(2000, function() { alError.hide(); });
}
});