2
我在一個小型的jQuery移動框架網站中實現flot。包含flot的頁面/內容div位於輔助頁面上。第一次顯示flot頁面時,圖表很好地呈現。回到主頁面並再次轉發到頁面,圖表不會呈現。jquery mobile和flot庫
內容是從ASP MVC視圖來:
<div id="chartcontainer">
<div id="chartdiv" style="height:300px;width:400px;"></div>
</div>
<script type="text/javascript">
$(function() {
var d1 = [[1, 1], [2, 2], [3, 3]];
$.plot($("#chartdiv"), [d1]);
});
</script>