【发布时间】:2018-03-06 10:00:03
【问题描述】:
由于模态形式,我正在使用 ajax, 我有一个 toastr 通知显示 ajax 成功。
toastr.success("We will get back to you with response, Thanks !");
然后:
window.location.reload();
我怎样才能让它先结束通知然后重新加载。 我发现了一些东西,但它很快重新加载了页面:
$.when( toastr.success("We will get back to you with response, Thanks !") ).then(function( data, textStatus, jqXHR ) {
window.location.reload();
});
还有其他合适的/最佳实践方式吗?
【问题讨论】:
标签: javascript jquery toastr