Data Page: Calculate entries of listings with pagination

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2013-06-28 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 149 All time: 269 This week: 104Up
Version License JavaScript version Categories  
data-page 1.0Artistic License1.0Algorithms
Description Author  

This object can calculate entries of listings with pagination.

It takes as parameters the total number of entries per page, the limit of entries in each page, the current page number and total number of page entries.

The object can return the number of entries on the current page, the number of the first_page, last_page, the first entry of the current page, the previous page number, the next_page number, and the numbers of all pages.

Innovation Award  
JavaScript Programming Innovation award nominee
June 2013
Number 3
Splitting long listings of content across multiple pages is a common design pattern used by many sites.

This JavaScript object can perform the necessary calculations to determine which listing entries should be displayed on each page, as well other details to build links to go to the different listing pages.

Manuel Lemos
Picture of Lucas Tiago de Moraes
Name: Lucas Tiago de Moraes <contact>
Classes: 1 package by
Country: Brazil Brazil
Age: 27
All time rank: 11111 in Brazil Brazil
Week rank: 52 Up5 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file DataPage.js Class Class DataPage
Accessible without login HTML file DataPage.html Doc. Documentation Class DataPage
Accessible without login HTML file example1.html Example Example 1
Accessible without login HTML file example2.html Example Example 2

 Version Control Unique User Downloads Download Rankings  
 0%Total:149All time:269
 This week:0This week:104Up