Skip to content

Instantly share code, notes, and snippets.

@eljamez
Last active December 29, 2015 08:49
Show Gist options
  • Save eljamez/7645677 to your computer and use it in GitHub Desktop.
Save eljamez/7645677 to your computer and use it in GitHub Desktop.
Just a quick snip that returns the scroll position of the page.
# start at the top
scroll_top = 0
# on the scroll
$(@).scroll () =>
scroll_top = $(@).scrollTop()
# log it
console.log scroll_top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment