我有一个jQuery Mobile 1.3.0应用程序正在进行Ajax调用以动态加载数据.我已经在jQuery Mobile的早期版本中看到过这样做的各种选项(请参阅jQuery Mobile中的Ajax Call上的Show Page Loading Spinner),但是没有找到1.3的答案.
Ajax调用类似于:
$.getJSON(url, function(data) {
console.log(JSON.stringify(data));
$.each(data.cards, function(index, card) {
$('#card-name').text(card.title);
});
});
Run Code Online (Sandbox Code Playgroud)
为每个Ajax调用显示加载微调器的最佳方法是什么?