1
我使用sweetalert來顯示刪除確認,稍後在顯示加載操作時處理它,儘管它不工作,thi是代碼,不起作用(它應該顯示加載動畫,但實際上並沒有這樣做)有什麼想法?SweetAlert showLoaderOnConfirm不顯示
這javascript的
document.querySelector('div.test').onclick = function() {
swal({
title: 'Ajax request example',
text: 'Submit to run ajax request',
type: 'info',
showCancelButton: true,
closeOnConfirm: false,
showLoaderOnConfirm: true,
}, function(){
setTimeout(function() {
swal('Ajax request finished!');
}, 2000);
});
};
的Html
<div class="test">
<button>show alert</button>
</div>
這是fiddle
謝謝,你這樣做有問題,我不知道我的,包括是錯誤的,因爲它的工作幾乎是罰款,但謝謝你的提示(順便說一句jquery與我的數據表發生衝突,所以我根本沒有使用它,使用我的1.12.3 jQuery)謝謝你的提示救了我 – LaravelOnly