Scrolling Event Listener

The code below will capture the current scroll position (window.pageYOffset) and pass it to the doSomething function when the user scrolls the page.
Remember to replace doSomething with your actual function name, and you can modify the doSomething function to implement the desired parallax effect for your container.
I hope this helps! Let me know if you have any further questions.

document.addEventListener(“scroll”, (event) => {
const lastKnownScrollPosition = window.pageYOffset;
doSomething(lastKnownScrollPosition);
});