【发布时间】:2011-08-04 02:05:30
【问题描述】:
我一直在使用 google 饼图和 jquery Ajax.Load()
我的问题是饼图仅在 ajax 加载调用返回后才加载,这完全没有抓住重点,让页面加载(包括图表),然后异步加载大量内容。
http://code.google.com/apis/chart/interactive/docs/gallery/piechart.html
饼图加载者:
google.setOnLoadCallback(drawChart);
Ajax 调用如下:
$("#id").load(url, function(response, status, xhr) {
if (status == "error") {
alert(xhr.status + " " + xhr.statusText);
}
else {
$("#id").show();
}
});
如何在 ajax 加载完成之前加载谷歌饼图?
【问题讨论】: