const loading = `<div class="spinner spinner-border text-white" role="status">
<span class="sr-only">Loading...</span>
</div> Loading`
beforeSend: function () {
$("#btn-submit").html(loading);
$("#btn-submit").attr('disabled', true);
},
success: function (response) {
$("#btn-submit").removeAttr('disabled');
$("#btn-submit").html("Proses");
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter