Skip to content

Commit

Permalink
Merge pull request chuanxshi#32 from DanielWeigl/master
Browse files Browse the repository at this point in the history
jquery scroll-pattern
  • Loading branch information
chuanxshi committed Jan 30, 2012
2 parents 8337e39 + d7988b3 commit 6798081
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions jquery-patterns/window-scroll-event.html
Expand Up @@ -33,6 +33,28 @@

// reference
// http://ejohn.org/blog/learning-from-twitter/


// preferred v2, timeout instead of intervall - no unnecessary ticks
var scrollTimeout; // global for any pending scrollTimeout
var outerPane = $details.find(".details-pane-outer"),

$(window).scroll(function() {
if (scrollTimeout) {
// clear the timeout, if one is pending
clearTimeout(scrollTimeout);
scrollTimeout = null;
}
scrollTimeout = setTimeout(scrollHandler,250);
});

scrollHandler = function() {
// Check your page position and then
// Load in more results
// outerPane.html();
};


</script>
</body>
</html>

0 comments on commit 6798081

Please sign in to comment.