Search code examples
javascriptpaginationpaginator

How to generate page numbers using javascript?


How do I generate page numbers for a multi page data set using javascript?

Consider there are 55 pages. I want to generate page numbers like this

1 2 3 4 5 ..... 55 next

Which is rather similar to the Stackoverflow questions pager

Any suggestions?


Solution

  • There is a Jquery pagination plugin, you can use it directly or check its source to get an idea for own custom pagination script.

    Hope this helps, Sinan.