Skip to content

Instantly share code, notes, and snippets.

@zhusee2
Created May 13, 2013 00:57
Show Gist options
  • Save zhusee2/5565563 to your computer and use it in GitHub Desktop.
Save zhusee2/5565563 to your computer and use it in GitHub Desktop.
jQuery(function($) {
var continueFlag = false;
var logScroll = function() {
console.log(window.scrollY, continueFlag);
if (continueFlag) {
setTimeout(function() { logScroll() }, 1000/60);
}
}
$(window).on('touchend', function(event) {
continueFlag = true;
logScroll();
});
$(window).on('scroll', function(event) {
continueFlag = false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment