在给定这里的情况下,我使用了脚形分页示例,但是分页在我的情况下不起作用。
以下是我的代码
<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=“分页”,但这也不起作用。有人能指出什么是缺的吗?
发布于 2015-09-29 06:56:24
几个月前我终于解决了这个问题。添加他们在可引脚存储库中的文件,对我来说从来没有用过。我对他们的例子是如何巧妙地发挥作用感到困惑,而我的例子却没有!最后,我决定访问它们的源代码,获取示例直接使用的文件,并在我的代码中引用它们。
瞧!它开始像魅力一样发挥作用:)
请注意:我已经多次比较了示例中的所有引用,没有任何东西是我不使用的--它们用于示例的文件是有用的,而且它们的存储库中的文件也从未对我起过作用。
发布于 2015-09-23 07:51:40
确保包含了分页附加的javascript文件。
https://stackoverflow.com/questions/30298135
复制相似问题