-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger last page hit if loaded page appends 0 items #840
Comments
I got this problem...returns 0 items and trigger a loop of endlessly loading pages |
+1 using json keep loaded after last record, and pageindex is incrementing. |
I also met this problem, but I found that the page I wanted to load contained <ul class="pagination justify-content-center flex-wrap">
<li class="page-item active"><a href="?index-1.htm" class="page-link">1</a></li>
<li class="page-item"><a href="?index-2.htm" class="page-link">2</a></li>
<li class="page-item"><a href="?index-2.htm" class="page-link">▶</a></li>
</ul> Even on the last page it doesn't have much more content , the page also had this <ul class="pagination justify-content-center flex-wrap">
<li class="page-item"><a href="?index-1.htm" class="page-link">◀</a></li>
<li class="page-item"><a href="?index-1.htm" class="page-link">1</a></li>
<li class="page-item active"><a href="?index-2.htm" class="page-link">2</a></li>
</ul> So I guess maybe use two classes selectors $('.threadlist').infiniteScroll({
path: '?index-{{#}}.html',
append: '.thread',
status: '.scroller-status',
hideNav: '.pagination',
debug: true,
checkLastPage: ".page-item active",
// responseType: 'document'
}); Yes it workd! |
This is still an issue with loading data via json. Loading data via json is really not documented very well. I hacked together a solution that stops the loading, but it doesn't trigger the .infinite-scroll-last message. Also, is there a place that a commercial license holder can get support with this product? |
tray like this :
}); $container.on( 'load.infiniteScroll', function( event, response ) {
}); |
✅ fix checkLastPage with falsey function
Infinite Scroll v4 has been released. Infinite Scroll includes revised behavior that the last page will be triggered if |
A couple issues like #761 and #839 have popped up where a page loads but returns 0 items. At this point Infinite Scroll will then try to load the next page, which could trigger a loop of endlessly loading pages. One solution is to add a conditional where, if
append
is enabled, and the loaded page includes 0 items, then that be considered the last page hit.Add a 👍 reaction to this issue if you would like to see this feature added. Do not add +1 comments — They will be deleted.
The text was updated successfully, but these errors were encountered: