我已經受了很長一段時間的折磨。如何取消選中與分頁功能tablesorter中的所有複選框
由於表分揀機分頁將從表中完全刪除不可見的行以加快排序。我無法得到每一行中的複選框以按照我的意願工作。
這裏是我的jsfiddle - > http://jsfiddle.net/NcqfY/3/
單擊變量觸發彈出表
基本上就是我想要做的就是id爲所有選定的行和他們推入陣列selectedID
。報告創建時(或「創建報告」按鈕被單擊)時爲空selectedID
數組。所以當我點擊按鈕後,我希望表格中的所有複選框都應該取消選中。我使用下面的代碼:
$('table.tablesorter tbody tr').find('input[type=checkbox]').prop('checked', false); // I can only uncheck the boxes in current page
但是我只能清除複選框,在當前頁面,不包括不可見的頁面。這真的讓我很難得到選定行的正確ID。
任何人都可以幫助我,將不勝感激!
作品太感謝你了!從來沒有聽說過'config.rowsCopy',有沒有參考? – sozhen 2012-08-08 22:29:13
http://stackoverflow.com/questions/5819415/accessing-the-whole-table-when-using-the-tablesorter-and-tablesorterpager-jquery,只是一個簡單的谷歌搜索:) – orhanhenrik 2012-08-08 22:30:56