Code to go logo
Created using Figma
Use Cases
Contribute
How to listen to scroll event in JavaScript
DOM
By Jad Joubran ·
Last updated Nov 05, 2018
window.addEventListener("scroll", event => { console.log("Window scrolled", event); });
Nov 05, 2018
1
Jad Joubran
See answer
1
Jad Joubran
MDN Docs
Learn JavaScript step by step