我正在努力學習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