/ Published in: jQuery

Another approach that helps saving the overhead calls of the scroll event and the subsequent code.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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);
URL: http://ejohn.org/blog/learning-from-twitter/
Comments
