Return to Snippet

Revision: 56813
at April 16, 2012 06:12 by Narayon


Initial Code
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);

Initial URL
http://ejohn.org/blog/learning-from-twitter/

Initial Description
Another approach that helps saving the overhead calls of the scroll event and the subsequent code.

Initial Title
Substitute for the scroll event

Initial Tags
javascript, js, jquery

Initial Language
jQuery