[jQuery] Re: jQuery newbie - working through Learning jQuery book

2007-12-29 Thread Karl Swedberg
Hi there, Sorry about the confusion with the API change. If you're replacing the .lt() method, you're going to need to use 2 arguments with the .slice() method, with the first argument being 0. So, try .slice(0, currentPage * numPerPage) instead. That will select the elements with an inde

[jQuery] Re: jQuery newbie - working through Learning jQuery book

2007-12-29 Thread rodeopro
Hi Karl, Thanks, that did help in getting the links to work correctly. However, the new code (with slice) isn't working for displaying only 10 rows per page. I'm using the downloaded page and tables.js code (with the slice modifications) from the Learning jQuery website, not my own code. On pag

[jQuery] Re: jQuery newbie - working through Learning jQuery book

2007-12-29 Thread Karl Swedberg
Ooops. Yeah, that second one was originally a .gt(), so we should leave it as .slice( (currentPage + 1) * numPerPage - 1) That little chunk of code should look like this: $table.bind('repaginate', function() { $table.find('tbody tr').show() .slice(0,currentPage * numPerPage

[jQuery] Re: jQuery newbie - working through Learning jQuery book

2007-12-29 Thread rodeopro
Thanks! That worked, the pages are displaying correctly now. I'm still confused on how slice is used differently to replace the .lt and .gt methods, with .lt receiving two arguments, while .gt only received 1 argument. I visited the online documentation pages at jquery.com, and read the 1.2 relea