Last active
December 30, 2015 15:19
-
-
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.
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
// 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