headroom.js
headroom.js copied to clipboard
Added 'up' and 'down' values for offset option
This very simple update makes offset more powerful. Use case:
- You want scroll up to always pin the navigation.
- You want scroll down to leave the navigation alone until the navigation is above the fold.
offset = 0
accomplishes (1) but not (2).
offset = NAV_HEIGHT
accomplishes (2) but not (1).
With this update you can set offset = {'up': 0, 'down': NAV_HEIGHT}
to accomplish both.