【发布时间】:2011-12-06 09:25:43
【问题描述】:
在同一个 html 页面中,我需要使用 jquerymobile (www.jquerymobile.com) 并使用 jqplot js 库 (www.jqplot.com) 绘制一个简单的图表。
我认为 jqplot 和 jquerymobile 之间存在冲突问题,因为图表未显示。但是,如果我评论 jquerymobile 脚本,图表就会变得可见。
这是我的 html 代码的一部分:
[...head...]
<link rel="stylesheet" type="text/css" href="jquery.jqplot.1.0.0b2_r792/dist/jquery.jqplot.css" />
<script type="text/javascript" src="jquery-1.7.1.js"></script>
<script type="text/javascript" src="jquery.mobile-1.0/jquery.mobile-1.0.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="jquery.jqplot.1.0.0b2_r792/dist/jquery.jqplot.js"></script>
<script type="text/javascript" src="jquery.jqplot.1.0.0b2_r792/dist/plugins/jqplot.canvasTextRenderer.min.js"></script>
<script type="text/javascript" src="jquery.jqplot.1.0.0b2_r792/dist/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
[...script...]
$(document).ready(function () {
var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]);
});
[...body...]
<div class="jqplot" id="chart1" style="height:300px;width:400px;"></div>
有什么克服冲突的建议吗?也许我想念什么?
提前致谢, M.
【问题讨论】:
标签: javascript jquery jquery-mobile jqplot