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
Infinite scroll keeps repeating last records from database #49
Comments
Which version of the plugin are you using? Do you have a live site we can see this on or could you replicate with jsFiddle? Thanks. |
Hi I'm using version 2.0 at the moment. I've downloaded it from github. I have Jurgen 2011/6/10 lukeshumard <
|
I've made a test page. You can visit it on http://extranet.lunasoftbe.com/ecommerceV3/index.php/nl/login/test |
In my console, I see that it's requesting ?page=2, ?page=3, ?page=4 and so on. Maybe this is something to do with how you're returning results from your query rather than the plugin? |
My query returns a total of 2 pages, I've printed that out after the first 2011/6/15 lukeshumard <
|
That path in debug is an array split into 2 parts. Where the separation is ( What comes up in mine is ?page=2, ?page=3, ?page=4 and so on. If I go to http://extranet.lunasoftbe.com/ecommerceV3/index.php/nl/login/test?page=4, it's bringing up the values that you say are repeated. In your backend solution, you just need to sort it so that if there are no more results, it should result in a 404. |
Thank you for the help. It was indeed the 404 response that I needed. 2011/6/17 lukeshumard <
|
My infinite scroll keeps repeating the last records from database when on end of amount of pages. Is this a bug or what am I doing wrong?
$('#list').infinitescroll({
navSelector : "div.pagination a#next:last",
nextSelector : "div.pagination a#next:last",
itemSelector : "#list #assortiment",
debug : false,
loadingText : "loading...",
animate : true,
extraScrollPx: 100,
bufferPx : 40,
localMode : true
});
The id #assortiment is a table where the infinite scroll adds the rows to, this works but when I'm out of pages the infinite scroll remembers my last page and keeps scrolling that page.
If I use the triggered infinite scroll all is correct. Seems to be something with the binding of my infinite scroll?
The text was updated successfully, but these errors were encountered: