0
下面的代码显示一个混乱的图表,JQuery的影响谷歌图表显示
function() displayGoogleChart() {
/* displays chart */
}
$("#chartDiv").hide();
displayGoogleChart();
$("#chartDiv").show();
但这个代码显示细腻,像这样:
$("#chartDiv").hide();
$("#chartDiv").show();
displayGoogleChart();
为什么这发生?
这可能是displayGoogleChart内部正在尝试获取宽度或高度或某些其他css值,因为它被隐藏而返回意外值的东西。 – dwaddell 2013-05-13 20:01:10