russellsamora / scrollama

Scrollytelling with IntersectionObserver.

Home Page:https://russellsamora.github.io/scrollama/basic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Back to start on load

BMPMS opened this issue · comments

commented

Hi there,

A really stupid question but I can't work out how to reset the scroller so that it is back at step 1 on load.

window.addEventListener("load", ???);

I've tried re-running init() and window.scrollTo, resetting window.scrollY.

Any advice greatly appreciated.

Hi there,

A really stupid question but I can't work out how to reset the scroller so that it is back at step 1 on load.

window.addEventListener("load", ???);

I've tried re-running init() and window.scrollTo, resetting window.scrollY.

Any advice greatly appreciated.

scrollama.destroy() and re-running scrollama.setup() should handle it