Created
July 31, 2015 04:43
-
-
Save anthonylrivera/d67f80da524982193d90 to your computer and use it in GitHub Desktop.
Optimized Scroll Detection Technique
This file contains 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
var outerPane = $details.find(".details-pane-outer"), | |
didScroll = false; | |
$(window).scroll(function() { | |
didScroll = true; | |
}); | |
setInterval(function() { | |
if ( didScroll ) { | |
didScroll = false; | |
// Check your page position and then | |
// Load in more results | |
} | |
}, 250); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment