我正在努力学习jQuery与“从包装学习Jquery 1.3书”。jquery分页
我正在关注这封信的代码,但我发现很难让代码正常工作。
我正在尝试使用下面的代码进行简单的页面分页,但我没有运气,任何人都可以告诉我为什么,并提供一些建议。
谢谢。
$(document) .ready(function() {
$('table.paginated').each(function() {
var currentPage = 0;
var numberPage = 5;
var $table = $(this);
$table.find('thead tr').hide()
.slice(currentPage * numPerPage, (currentPage + 1) * numPerPage)
.show();
});
});
我的表选项卡:
<table id="tablesorter" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
<thead>
<tr>
<th>Ref</th>
<th>Date</th>
<th>Company</th>
<th>Operator</th>
<th>Boxes</th>
<th>Network</th>
<th>Quote Accept</th>
<th>Term Accept</th>
<th>Credit Check</th>
<th>Expiry</th>
</tr>
</thead>
<tbody>
我不是没有,你认为那问题 – 2009-10-02 14:23:03
@ OliverBayes - 谢尔顿那么,如果在需要的时候,那么我会说这还不包括他们来说是一个很大的问题。 ;-) – 2014-04-04 10:50:11