解決jqplot與jquery-ui導入必要包時的衝突

對於一個網頁中,即要有jqplot的畫圖,又要有jquery-ui的風格顯示!javascript

但在導入必要的包時,出現了問題!css

先導入jqplot的必要包:java

1 <link type="text/css" rel="stylesheet"  href="../css/jQuery/jqPlot/jquery.jqplot.min.css" />
2 <link type="text/css" rel="stylesheet"    href="../css/jQuery/jqPlot/syntaxhighlighter/styles/shCoreDefault.min.css" />
3 <link type="text/css" rel="stylesheet"    href="../css/jQuery/jqPlot/syntaxhighlighter/styles/shThemejqPlot.min.css" />
4 <script type="text/javascript"  src="../js/excanvas.js"></script>
5 <script type="text/javascript"  src="../js/jQuery/jquery.min.js"></script>
6 <script type="text/javascript"    src="../js/jQuery/jqPlot/staticjquery.jqplot.min.js"></script>
7 <script type="text/javascript"  src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shCore.min.js"></script>
8 <script type="text/javascript"    src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shBrushJScript.min.js"></script>
9 <script type="text/javascript"    src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shBrushXml.min.js"></script>    

再導入jquery-ui的必要包:jquery

1 <link rel="stylesheet" href="../css/bootstrap.min.css" media="screen">
2 <link rel="stylesheet" href="../css/cupertino/jquer121y-ui-1.10.3.custom.css" />
3 <link rel="stylesheet" href="../css/cupertino/button.select.css" />
4 <script src="../jquery_ui/jquery-1.9.1.js"></script>
5 <script src="../js/jquery-ui-1.10.3.custom.js"></script>
6 <script src="../js/jquery.ui.datepicker-zh-TW.js"></script>

這樣子的話能有jquery-ui的樣式,會畫不出圖表,想固然就是jquery-ui的必要包會跟jqplot的必要包起衝突,而進行覆蓋!bootstrap

若是導入jquery-ui的必要包,再導入jqplot的必要時的順序的話,這樣不能有jquery-ui的樣式,但卻能畫出圖來!canvas

 

解決的方法!以下,將必要包進行混合:ui

 1 <link type="text/css" rel="stylesheet"  href="../css/jQuery/jqPlot/jquery.jqplot.min.css" />
 2 <link type="text/css" rel="stylesheet"    href="../css/jQuery/jqPlot/syntaxhighlighter/styles/shCoreDefault.min.css" />
 3 <link type="text/css" rel="stylesheet"    href="../css/jQuery/jqPlot/syntaxhighlighter/styles/shThemejqPlot.min.css" />
 4 <link rel="stylesheet" href="../css/bootstrap.min.css" media="screen">
 5 <link rel="stylesheet" href="../css/cupertino/jquer121y-ui-1.10.3.custom.css" />
 6 <link rel="stylesheet" href="../css/cupertino/button.select.css" />  
 7 
 8 <script src="../jquery_ui/jquery-1.9.1.js"></script>
 9 <script src="../js/jquery.ui.datepicker-zh-TW.js"></script>
10 <script type="text/javascript"  src="../js/excanvas.js"></script>
11 <script type="text/javascript"  src="../js/jQuery/jquery.min.js"></script>
12 <script type="text/javascript"    src="../js/jQuery/jqPlot/staticjquery.jqplot.min.js"></script>
13 <script type="text/javascript"  src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shCore.min.js"></script>
14 <script type="text/javascript"    src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shBrushJScript.min.js"></script>
15 <script type="text/javascript"    src="../js/jQuery/jqPlot/syntaxhighlighter/scripts/shBrushXml.min.js"></script>    
16 <script src="../js/jquery-ui-1.10.3.custom.js"></script>

 出現上面這樣子將必要包導入時不會出現覆蓋的狀況,即能有jquery-ui的樣式,但卻能畫出圖來!spa

相關文章
相關標籤/搜索