Skip to content
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

When using callback function, it only calls once. #38

Open
nffdiogosilva opened this issue Sep 6, 2013 · 3 comments
Open

When using callback function, it only calls once. #38

nffdiogosilva opened this issue Sep 6, 2013 · 3 comments

Comments

@nffdiogosilva
Copy link

$("#events").endlessScroll({
                inflowPixels: 100,
                fireOnce: true,
                fireDelay: 10,
                callback: function(i, p, d){
                    console.log(i, p, d);
                }
            });

Any clue what might be?

Version is: 1.8.0

@nffdiogosilva
Copy link
Author

If I change ceaseFireOnEmpty to false.... it keeps onGoing...

@fredwu
Copy link
Owner

fredwu commented Sep 8, 2013

Well, it's been over a year since I used the library I am not really sure. Perhaps give version 1.6 a try?

@nffdiogosilva
Copy link
Author

I'm not sure, but i believe that the problem was that i was calling an ajax request inside the callback function.

It would receive JSON data , than i would append that data on the div. After that, the callback wouldn't work anymore.

Anyway, i have solved the problem, using my own code.

When i have the time, i'll do a jsfiddle replicating the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants