0
我有以下代碼來加載tablesorter插件中的數據。這裏我顯示了pgl中的記錄數,但當點擊50並返回到25時總計數顯示不正確。表排序插件不正確的記錄數
任何想法爲什麼發生這種情況?
<div class="rowsPerPage">
<a href="javascript:void(0);" onclick="test1(25);">25</a>
<a href="javascript:void(0);" onclick="test1(50);">50</a>
<a href="javascript:void(0);" onclick="test1(toalnoofrecords);">All</a>
</div>
<div id="pg">
<div id="pgl"></div>
<div id="pgR"></div>
</div>
<table id="testtable">
datas comes here
</table>
<!---- javascript function -->
function test1(val)
{
$(jQuery('#testtable').tablesorterPager({container: $("#pgR"), positionFixed: false,size: value }));
}
你可以分享'test1()'的代碼嗎?另外,'$(jQuery('#testtable')...)'是一種奇怪的格式,你不需要將整個東西包裝在'$()'中。另外,'val'和'value'在你的'test()'函數內部不匹配。 – Mottie 2013-03-01 23:55:38
@Mottie對不起,我把測試(),而不是test1.Please現在看看。 – svk 2013-03-02 01:06:20