July 9, 2020 06:54 pm GMT
Original Link: https://css-tricks.com/memorize-scroll-position-across-page-loads/
Memorize Scroll Position Across Page Loads
Hakim El Hattab tweeted a really nice little UX enhancement for a static site that includes a scrollable sidebar of navigation.
If you've got a static site with a scrollable sidebar, it really helps to memorize the scroll position across page loads.
(left is default, right memorized) pic.twitter.com/bLgtILP1JP
— Hakim El Hattab (@hakimel) May 18, 2020
The trick is to throw the scroll position into localStorage
right before the page is exited, and when loaded, grab that value and … Read article “Memorize Scroll Position Across Page Loads”
The post Memorize Scroll Position Across Page Loads appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/memorize-scroll-position-across-page-loads/
Share this article:
Tweet
View Full Article