personal / library / archived
jQuery Store Scroll Offset
A jQuery plugin that remembers an overflow element's scroll position in cookies across page loads, with optional snap-to-item and padding. MIT/GPLv2.
- BPM
- 130
- GRADE
- B
- LEVEL
- 4
- RELEASES
- 0
- YEARS
- 2012–2012
Pushed The Next Day
The day after I wrote it, I put it up on GitHub under spacedevin.
It stores an overflow div's scroll offset in a cookie with jQuery, restores it on the next page load, and can optionally snap to a child element with configurable padding so the restored position lands cleanly on an item. It uses an existing cookie plugin rather than parsing document.cookie itself.
MIT and GPLv2. I don't think anyone else used it, but the next time I built a scrolling portfolio strip the fix was already there.