Skip to content

Instantly share code, notes, and snippets.

@paulkmiller
Created April 14, 2016 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulkmiller/63af994f0b42253b5b1a5e2ccac4c83c to your computer and use it in GitHub Desktop.
Save paulkmiller/63af994f0b42253b5b1a5e2ccac4c83c to your computer and use it in GitHub Desktop.
var scrollLoad = true;
$(window).scroll(function () {
if (scrollLoad && $(window).scrollTop() >= $(document).height() - $(window).height() - 300) {
scrollLoad = false;
//Add something at the end of the page
alert("triggered");
$.get('/honorees/json_test.php', function(data) {
console.log(data);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment