【问题标题】:jquery script issue while using third party pagination使用第三方分页时出现 jquery 脚本问题
【发布时间】:2020-06-17 01:36:03
【问题描述】:

我正在实现 twbs 分页,但它需要

的脚本
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

但我现有的代码需要脚本

 <script src="https://code.jquery.com/jquery-3.3.1.js"></script> 

如果我同时添加这两个脚本,我的分页将无法正常工作..

代码是

<div class="col-sm-12">
        <ul id="pagination-demo" class="pagination-sm"></ul>
      </div>
<div id="page-content" class="page-content">Page 1</div>

有没有人知道添加脚本并且一切正常的解决方案。

【问题讨论】:

    标签: jquery ajax spring-boot pagination


    【解决方案1】:

    那些实际上是相同的代码。一个只是缩小了,不容易被人类阅读。任何一个都应该工作,但不能同时工作。

    https://en.wikipedia.org/wiki/Minification_(programming)

    【讨论】:

    • 在我的代码中
    • 只包含 .min 一个,但只包含那个。您不能在同一页面上包含多个 jquery。
    • 非常感谢会这样做
    【解决方案2】:

    为什么您现有的代码不适用于缩小的代码?只需使用 .min.js(jQuery 的压缩版本)文件就可以了。永远不要包含 jQuery 两次。

    【讨论】:

    • 所以你想说代码应该在缩小的代码上工作,如果它不工作,那么使用 .min.js(compressed)..
    • 只用这个:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-06-17
    • 2014-05-09
    • 2021-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-17
    相关资源
    最近更新 更多