webdad3
webdad3

Reputation: 9080

pagination from filtered search

I am doing a search in jQuery:

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

I'd like to be able to do some quick pagination (without a plugin) from the rows that remain in the table from the above find.

What is the best way to do this?

Upvotes: 0

Views: 73

Answers (1)

Sergey
Sergey

Reputation: 8071

Just attach this one as an example and include the search before to call:

showPage = function(page) {
    $(".content").hide();
    $(".content").each(function(n) {
        if (n >= pageSize * (page - 1) && n < pageSize * page)
            $(this).show();
    });        
}

Upvotes: 1

Related Questions