Replace component on scroll

I often create sites with an alternate nav. I can’t prototype the change from one nav to another when the viewer scrolls down the page. It would be great to create a “on scroll” function.