次のコードがあります。
$("body")
.ajaxStart(function () {
$(this).css({ 'cursor': 'progress !important' })
})
.ajaxStop(function () {
$(this).css({ 'cursor': 'default !important' })
});
これを発行すると、コードは機能しますが、カーソルの変更をトリガーしていないようです:
$.get(href)
.success(function (content) {
// code here
})
.fail(function (ajaxContext) {
// code here
});
$.ajax を使用して .ajaxStart をトリガーする必要がありますか?
更新: !important に変更しました。