windows scroll condition

Solutions on MaxInterview for windows scroll condition by the best coders in the world

showing results for - "windows scroll condition"
Roberto
18 Apr 2018
1window.onscroll =  ()  =>{
2    // called when the window is scrolled.
3    if (window.scrollY >= 30) {
4
5        //your event
6        console.log(window.scrollY);
7
8    } else {
9        //your event
10    }
11}