Give the table a class of the type paginate-N where "N" is an integer value representing the number of table rows to show for each page. Additionally, the class max-pages-N will tell the script to create a maximum of N numbered pagination links.
The following 102 line table has the following className:
class="sortable-onload-3r no-arrow colstyle-alt rowstyle-alt paginate-10 max-pages-7 paginationcallback-callbackTest-calculateTotalRating sortcompletecallback-callbackTest-calculateTotalRating"
Note: Hold down the shift key to select multiple columns to sort
The “Average (Fake) Rating” is calculated by using the callback function callbackTest.calculateTotalRating(). View the page source to see the actual callback function code.
The following “Simulate Table Filter” button simulates a filter being ran on the table data i.e. it removes table rows and then calls the tablePaginater.init method. The “Reset Table” button just resets the table to it’s initial value.
| Average (fake) Rating | … | |||||
| Release Date | Movie | Distributor | Budget | US Gross | Intl. Gross | My (Fake) Rating |
|---|---|---|---|---|---|---|
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
The following ten line table has no sort routine initiated and no max-pages-N defined within the className. As there are only two pages to create, the Next & Previous buttons will not be shown.
class="rowstyle-alt paginate-5"
| Release Date | Movie | Distributor | Budget | US Gross | Intl. Gross | My (Fake) Rating |
|---|---|---|---|---|---|---|
| 06/30/2004 | Spider-Man 2 | Columbia | $200,000,000 | $373,524,485 | $783,524,485 | 10 |
| 12/19/1997 | Titanic | 20th Century Fox | $200,000,000 | $600,788,188 | $1,835,400,000 | 9.2 |
| 06/30/1999 | Wild Wild West | Warner Bros. | $175,000,000 | $113,805,681 | $217,700,000 | 2.5 |
| 07/28/1995 | Waterworld | Universal | $175,000,000 | $88,246,220 | $255,200,000 | 3.8 |
| 05/07/2004 | Van Helsing | Universal | $170,000,000 | $120,150,546 | $269,150,546 | 3.7 |
| 07/01/2003 | Terminator 3: Rise of the Machines | Warner Bros. | $170,000,000 | $150,358,296 | $433,058,296 | 2.2 |
| 11/10/2004 | Polar Express, The | Warner Bros. | $170,000,000 | $162,753,127 | $281,351,972 | 6.6 |
| 11/24/2004 | Alexander | Warner Bros. | $155,000,000 | $34,297,191 | $164,297,191 | 0 |
| 06/15/2005 | Batman Begins | Warner Bros. | $150,000,000 | $205,343,774 | $371,824,647 | 4.9 |
| 07/15/2005 | Charlie and the Chocolate Factory | Warner Bros. | $150,000,000 | $206,278,008 | $467,278,008 | 8.1 |
View the related post or download the tablesort JavaScript source or the pagination JavaScript source.
Table styles courtesy of the wonderful Veerle.