1
I need that when scrolling the page, apply css to div, example:
When the user arrives at half of the site, or at the desired Section, apply a CSS from this point to a div
, as the page scrolls down, changes the value of this item in CSS, for example, increases 1px
the value of left
of this div
with each scroll, giving the impression that as you scroll the page, the item will move to the side.
Someone has already needed to use something similar?
In fact what you want is a Parallax: https://plugins.jquery.com/tag/parallax/ does not only have the jQuery, has several different types of Parallax over the Internet, just know which one suits better what you need.
– Paulo Roberto Rosa
Here’s a functional example of one I found https://jsfiddle.net/byaprgu9/
– Paulo Roberto Rosa