【问题标题】:Footable plugin pagination not workingFootable插件分页不起作用
【发布时间】:2015-05-18 08:14:31
【问题描述】:

我已经按照here 给出的footable 分页示例进行了操作 但是分页在我的情况下不起作用。

以下是我的代码

<table id="exptab" class="table demo footable-loaded footable default" data-page-size="5">


  <thead>
    <tr>
      <th>Month</th>
      <th>Savings</th>
    </tr>
  </thead>
  <tbody >
    <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
    <tr>
      <td>February</td>
      <td>$80</td>
    </tr>
      <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
      <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
      <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
      <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
      <tr>
      <td>January</td>
      <td>$100</td>
    </tr>


  </tbody>
  <tfoot class="hide-if-no-paging">
  <tr>
    <td colspan="5" class="text-center">
        <ul class="pagination">
        </ul>
    </td>
  </tr>
</tfoot>

</table>

<script type="text/javascript">
    $(function () {
        debugger;
        $('table').footable();



    });

    </script>

在这里,我什至添加了一个 ul class="pagination" 进行分页,但这也不起作用。有人可以指出缺少什么。

【问题讨论】:

    标签: pagination footable


    【解决方案1】:

    确保您已包含分页插件 javascript 文件

    【讨论】:

      【解决方案2】:

      几个月前我终于解决了这个问题。以某种方式添加他们在可存储的存储库中的文件对我来说从来没有用过。我对他们的示例如何整洁地工作感到困惑,而我的却没有! 所以最后我决定访问他们的源代码并直接获取示例使用的文件并在我的代码中引用它们。

      瞧!它开始像魅力一样工作:)

      请注意:我已经多次比较了示例中的所有参考资料,我完全没有使用任何东西......但是他们用于示例的文件起到了作用,而他们存储库中的文件从来没有为我工作。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-08-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多