Skip to content
Advertisement

Tag: vertical-scrolling

How can I move a div on scroll?

I have to move a div when the the user scrolls, but need to use pure JavaScript. position: fixed; will not work with the layout. The div’s original position is relative to something else. Is there a simple implementation using an event like onscroll, to detect how many pixels the page moved up or down, and change the position of

Advertisement