I'm working my way through chapter 7 of the Learning jQuery book, and
encountered issues with .lt and .gt. After discovering that .lt
and .gt had been deprecated in the current release of jquery, I
replaced the sample code with the slice method.

However, I have had no luck getting:

1. the page to display only 10 rows of a table on each page
2. getting more than one page to display (none of the links for pages
1-7 work)

Has anyone worked their way through the table sorting/pagination code
in chapter 7?
Here's the code I used, which is not working:

var repaginate = function () {
    $table.find('tbody tr').show()
       .slice(currentPage * numPerPage)
          .hide()
       .end()
       .slice((currentPage + 1) * numPerPage - 1)
           .hide()
        .end();
};

Reply via email to