jquery-endless-scroll
jquery-endless-scroll copied to clipboard
When using callback function, it only calls once.
$("#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
If I change ceaseFireOnEmpty to false.... it keeps onGoing...
Well, it's been over a year since I used the library I am not really sure. Perhaps give version 1.6 a try?
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.