【发布时间】:2013-08-29 04:58:01
【问题描述】:
我想用$.getJSON 调用填充一个表:
$.getJSON("localhost/url",
function (data) {
$.each(data.reporting_list.reporting, function (i, item) {
rows = '<tr><td>' + item.data1 + '</td><td>' + item.data2 + '</td></tr>'
});
$('#aaa').append(rows);
});
填充后我想触发一些页面更改:
$.mobile.changePage("#homePage");
但在 $.getJSON 完成之前页面会发生变化。
我只想在 $.getJSON 完成后更改页面并改为显示 ajaxloader。
【问题讨论】:
标签: jquery json jquery-mobile asynchronous jquery-callback