Skip to content

Instantly share code, notes, and snippets.

@JulienMelissas
Last active December 30, 2015 15:19
Show Gist options
  • Save JulienMelissas/7847551 to your computer and use it in GitHub Desktop.
Save JulienMelissas/7847551 to your computer and use it in GitHub Desktop.
Just a simple jQuery snippet I made right quick to output the current scroll position of the window in the console. Helpful when working on badass parallax sites and working with libraries like Skrollr and the like.
// Log Current Scroll Position
$(window).scroll(function() {
var scroll_pos = $(window).scrollTop();
console.log(scroll_pos);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment