Scroll Event Listener in JavaScript

Posted on: January 11th, 2023
By: Tadeo Martinez

window.onscroll = function (e) {
    console.log(window.scrollY); // Value of scroll Y in px
};

Have any questions or comments? Write them below!


Leave a Reply

Your email address will not be published. Required fields are marked *