Jump to content

Help with complicated pagination


brandon88tube

Recommended Posts

I've been stumped over this for a while so I really hope someone can help me out here. I'm trying to build a pagination that only displays a set number of pages and then when the last number is clicked it will shift the numbers starting with the one just clicked. Then I would like it to set the first number to shift back to the other pair of numbers if it was clicked. Example: 1 2 3 4 5 , you click 5 it then displays 5 6 7 8 9 and if you were to click 5 again it would go back to 1 2 3 4 5. Clicking 9 would then display 9 10 11 12 13. Now if any number in between these numbers are clicked it should just display what is already there as in 5 6 7 8 9 if 6-8 were clicked. I might be able to get this working if I send some of the variables in the URL, but I DO NOT want this and even that is slightly difficult.

Link to comment
https://forums.phpfreaks.com/topic/153695-help-with-complicated-pagination/
Share on other sites

Why wouldn't clicking a middle-of-the-range number cause it to become the first or last in the range, as well?  TBH I think you're doing something that's not really useful/practical.  At most, I would leave the normal links alone and have separate links that bump up/down to the next/previous range bracket.  Regardless though, you're going to have to pass values through the url eventually.  Unless you're making each link a submit button, being passed via post, or using ajax via post method. 

 

But overall, link format manipulation w/out actually making a request is really a javascript issue.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.