私はそのような構造を使用しています:
$('#wait').ajaxStart(function() {
if ($(this).not(':visible'))
$(this).showWarning();
}).ajaxComplete(function() {
if ($(this).is(':visible'))
$(this).hideWarning();
}).ajaxError(function() {
alert('Unexpected error...');
});
また、ユーザーがクリックするたびに送信ボタンを無効にしたいと考えています。ユニバーサルにするために- ajaxStart メソッドで実行したいので、リクエストを初期化したボタンのIDを取得する方法はありますか? ありがとうございました