Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

windows scroll condition

window.onscroll =  ()  =>{
    // called when the window is scrolled.
    if (window.scrollY >= 30) {

        //your event
        console.log(window.scrollY);

    } else {
        //your event
    }
}
 
PREVIOUS NEXT
Tagged: #windows #scroll #condition
ADD COMMENT
Topic
Name
6+5 =