zoukankan      html  css  js  c++  java
  • 解决jqplot与jquery-ui导入必要包时的冲突

    对于一个网页中,即要有jqplot的画图,又要有jquery-ui的风格显示!

    但在导入必要的包时,出现了问题!

    先导入jqplot的必要包:

    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的必要包:

    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的必要包起冲突,而进行覆盖!

    如果导入jquery-ui的必要包,再导入jqplot的必要时的顺序的话,这样不能有jquery-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的样式,但却能画出图来!

  • 相关阅读:
    js+canvas画随机4位验证码
    linux 下 查看 nginx 日志中访问前10 的 ip
    mysql greatest函数
    php 如何获取 post 传递的raw 数据
    php 监控文件变化 并上传到服务器
    php 如何统计本周 本月
    Yii2.0 GridView 的强大功能
    git 导出新修改的文件
    ubuntu16.04 下安装phpMyAdmin
    如何在ubuntu16.04 上搭建 phpstorm + xdebug 调试
  • 原文地址:https://www.cnblogs.com/cnJun/p/3299204.html
Copyright © 2011-2022 走看看