次の方法を試しました。
1) 表示/非表示
$('button').ajaxStart(function() {
$(this).hide();
});
$('button').ajaxStop(function() {
$(this).show();
});
2) 表示/非表示
$('button').ajaxStart(function() {
$(this).css({visibility, 'hidden'});
});
$('button').ajaxStop(function() {
$(this).css({visibility, 'visible'});
});
3) クラスの追加/削除
$('button').ajaxStart(function() {
$(this).addClass('invisible');
});
$('button').ajaxStop(function() {
$(this).removeClass('invisible');
});
4) 有効化/無効化
$('button').ajaxStart(function() {
$(this).attr('disabled','disabled')
});
$('button').ajaxStop(function() {
$(this).removeAttr('disabled');
});
これまでのところ、Show/Hide メソッドだけが 1 秒未満で実行できる十分な応答性を備えています。残りは 1 ~ 2 秒かかりましたが、これは非常に長い時間です。ただし、ボタンを表示したいのですが、顕著な CSS の変更を加えて無効にします。送信ボタンを一時的に有効または無効にする、より応答性の高い方法はありますか?