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
Custom trigger, non-automatic infinite scroll not working in version 2 #37
Comments
Could you please elaborate on what is not working? It would also help if you could link to a live example or recreate your error on jsfiddle. Thanks. |
Since 2.0 isn't actually out and I've gotten a lot of emails about how to do this, I'll go ahead and post the code for how to achieve this with the current 2.0 beta.
|
Using the setup code you've supplied, we're experiencing a race condition when hiding/showing the navigation link. The hide happens in a callback that runs after the loading bar is animated into view. The show happens in the navigation link click handler after the retrieve is triggered (as shown in the above code). The first time we click the "next" link, the click handler executes the retrieve method—which displays the loading bar, hides the navigation link (the post-loading-bar-animation callback), and triggers the loading of the content—then shows the navigation link. The second time, it executes the retrieve method, then shows the navigation link; only this time the post-loading-bar-animation callback runs after our click handler has finished. In other words, the hide comes after the show and our navigation link never reappears. To make it work for now, we had to set |
Thanks for the in-depth explanation, @elliterate. Can you please provide a link or replicate the issue so we can examine further? Thanks. |
I whipped up a basic test app and put it here: https://github.com/elliterate/infinite_scroll_test. The README should describe how to duplicate the issue and our resolution. To be clear, I don't actually know if this is the same issue that @macsupport was experiencing. I saw no activity on the issue thread, so I hijacked it. |
Thanks for setting that up @elliterate. Is there anyway you could just have a static site that you could link to? |
It seems to work for me now. Here is a test page: |
Sorry, hit the wrong button. Didn't mean to close it! |
With @elliterate, I'll install the site over the weekend and make sure this resolves your issue as well, but I have a feeling that..a) it will, and b) that it's something unrelated to what this was started about. |
I am using Infinite scroll with JQuery Isotope and tried the 2.0 beta and find that my triggered infinite scroll breaks with this version. Any hints on making it compatible?
The text was updated successfully, but these errors were encountered: