Wie kann ich Lade-Symbol oder drehen, während meine während Ajax Anruf. unten ist mein CodeWie lade ich das Symbol auf sweetalert
swal({
title: "Confirm your transaction",
html:true,
showSpinner: true,
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Send",
closeOnConfirm: false
},function() {
$.ajax({
type: "post",
url: remoteUrl,
data: largeParams,
success: function (data) { }
}).done(function (data) {
swal("Thank you for your order", data, "success");
}).error(function (data) {
swal("Oops", "We couldn't connect to the server!", "error");
});
});
Antworten werden geschätzt.
Ich habe noch nie SweetAlert benutzt, aber die Webseite überprüft (https://sweetalert.js.org) Ich kann nicht alle Methoden finden: html, showSpinner, showCancelButton, confirmButtonColor, confirmButtonText, closeOnConfirm ... Sind Sie mit diesem Plugin oder gibt es ein anderes? –
mit Versprechen 'https: // sweetalert.js.org/guides/# using-Versprechen' – tonoslfx