0

I have built an Admin section where i can see all the contents from database in a table. everything is fine but if the database table has thousands of rows I have to scroll down very deep. is there any way I can make links like `1,2,3.Next the way google search results do? or is there any even better way?

    Isn't is going to be something like:

             if($(document).height>2000){
        //what should i do?
}
  • 2
    Sure, it's called pagination just google you way around including specific server side language you might be using.There are two types 1.Non-ajax (page gets reloaded like google) 2.Ajax ( content added by ajax like instagram).Former is simpler you don't need javascript for that one – Vinay Dec 11 '16 at 06:20

1 Answers1

0

Looks like you are using jquery. If you are going to implement everything on your own it may be time consuming - although it would be fun! To save some time, there are quite a few plugins available to achieve this. Refer:

Since you may have huge data you should be using server side pagination instead of client side. Here is another SO link which explains the difference between them : Pagination: Server Side or Client Side?

Community
  • 1
  • 1
Anurag Sinha
  • 1,014
  • 10
  • 17