asp.net mvc のコントローラーへの jquery.ajax 呼び出しを使用しています...読み込みインジケーターを表示したい..これを試しましたが、うまくいかないようです...
<div class="loading" style="padding-left:5px; margin-bottom:5px;display:none;">
Loading... 
</div>
私のjquery ajax呼び出しは次のようになります。
function getMaterials(currentPage) {
$.ajax({
url: "Materials/GetMaterials",
data: {'currentPage': (currentPage + 1) ,'pageSize':5},
contentType: "application/json; charset=utf-8",
global: false,
async: false,
dataType: "json",
success: function(data) {
var divs = '';
$("#ResultsDiv").empty();
$.each(data.Results, function() {
//my logic here....
$(".loading").bind("ajaxStart", function() {
$(this).show();
}).bind("ajaxStop", function() {
$(this).hide();
});
}
});
return false;
}
ローディングインジケータが表示されないようです..何か提案があれば....