Last active
February 26, 2016 16:16
-
-
Save adrianmcli/ad245226468cd7dba787 to your computer and use it in GitHub Desktop.
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
scrollHandler = () => { | |
// Get the element | |
const ele = $(this._container); | |
// Compare these two metrics to get the distance scrolled from the bottom | |
const metricA = ele[0].scrollHeight - ele.scrollTop(); | |
const metricB = ele.outerHeight(); | |
const distanceFromBottom = metricA - metricB; | |
console.log(`distanceFromBottom: ${distanceFromBottom}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment