0

我在 jQuery 中进行搜索:

$('#MainContent_myTable tr:gt(0)').each(function () {
    $(this).find('td:eq(0)').not(':contains(' + filterVal + ')').parent().hide();
});

我希望能够从上面找到的表格中保留的行中进行一些快速分页(没有插件)。

做这个的最好方式是什么?

4

1 回答 1

1

只需附上这个作为示例,并在调用之前包含搜索:

showPage = function(page) {
    $(".content").hide();
    $(".content").each(function(n) {
        if (n >= pageSize * (page - 1) && n < pageSize * page)
            $(this).show();
    });        
}
于 2013-09-04T20:03:12.577 回答