0
votes

I am using infinite ajax scroll for my pagination, however the 'load more items' link never seems to show 'none left' and keeps looping through pages 1 and 2. infinite ajax scroll pagination looping

I have tried 4 other pagination scripts, which don't work at all with infinite ajax scroll, as in it shows 'none left' when there should be 3 more pages.

So my question is how does the plugin know when to stop showing 'load more items'?

My second question is can anyone recommend a pagination script that will work with infinite ajax scroll? https://plugins.jquery.com/ias/

1

1 Answers

0
votes

General idea of stopping infinite scroll: You make a request. If ajax returns false then you display "None Left" message.

Let's say you get some Json data from pageNum=1 and pageNum=2 (below links) but when you call your pageNum=3 link with Ajax it returns false. Then you display your message.

myAjaxPage/?pageNum=1;
myAjaxPage/?pageNum=2;
myAjaxPage/?pageNum=3;

Since you did not share any code, I could not help you with actual code.