Skip to content

Instantly share code, notes, and snippets.

@sharpmachine
Created February 5, 2014 23:31
Show Gist options
  • Save sharpmachine/8835575 to your computer and use it in GitHub Desktop.
Save sharpmachine/8835575 to your computer and use it in GitHub Desktop.
Affix.js fix for when html, body { height: 100% }
Change the following is affix.js
From
this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
To
this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment