paulirish/infinite-scroll — Issue #98: Custom End Option
Author: SirSketch
Created: 2011-11-10 08:52:11+00:00
State: open

Hi,

I used your plugin in one of my projects for an online shop. It works great, but (and I know that this has been asked before) there is a problem I encountered.

The Plugin loads everything just fine until it reaches the last page. Then it continues to reload the first page! This is due to the fact that the system I'm installing it on has a built in fallback for any page number greater than the highest available. It just delivers the first page instead. Ending in a loop for your plugin (real infinite-scrolling).

I am not able to change the systems behavior here for it is needed for other things to work. So I was wandering if there was any custom way to make the plugin stop.

I did find the following Issue: https://github.com/paulirish/infinite-scroll/issues/32
The following is mentioned there and seems to be a solution, but I'm not sure how to use it!

```$('div').infinitescroll('stop', 'A variable to pass along'); // calls stop method and ending message```

Thank you,
SirSketch