So basically my problem is a seemingly simple one.
You can see it in action at http://furnace.howcode.com (please note that data is returned via Ajax, so if nothing happens give it a few moments!).
What's MEANT to happen, is in the second column when you reach the bottom of scrolling, the next 5 results are returned.
But what actually happens is it only returns the 5 results when you hit the TOP of the scroll area. Try it: scroll down, nothing happens. Scroll back up to the top, the results are returned.
What's going wrong?
Here's my code I'm using:
$('#col2').scroll(function(){
if ($('#col2').scrollTop() == $('#col2').height() - $('#col2').height()){
loadMore();
}
});
loadMore();
is the function that gets the data and appends it.
So what's going wrong here? Thanks for your help!
The following has been tested, and works fine:
$(window).scroll(function() {
if ($(window).scrollTop() == $(document).height() - $(window).height()) {
loadMore();
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With