Created
August 13, 2013 15:55
-
-
Save tibbon/6222633 to your computer and use it in GitHub Desktop.
Infinite Scroll Logic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).scroll(function() { | |
// Cache our jQuery selector for window | |
var win = $(window); | |
// Infinite scroll math! | |
if(win.height() + win.scrollTop() >= $(document).height()) { | |
populateCountries(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment