diff --git a/app/assets/javascripts/samples/sample_datatable.js.erb b/app/assets/javascripts/samples/sample_datatable.js.erb index 857ef7367..0117f89d9 100644 --- a/app/assets/javascripts/samples/sample_datatable.js.erb +++ b/app/assets/javascripts/samples/sample_datatable.js.erb @@ -487,6 +487,13 @@ function onClickSave() { data: data, success: function (data) { sampleAlertMsg(data.flash, "success"); + var flash = $('.alert'); + window.setTimeout(function () { + flash.fadeTo(500, 0).slideUp(500, function () { + $(this).remove(); + $('#content-wrapper').removeClass('alert-shown'); + }); + }, 5000); onClickCancel(); }, error: function (e, eData, status, xhr) {