codingtcher.com
Theme Night
Home
Login

onscroll add class jquery

Home » Tutorial Post » onscroll add class jquery
//onscroll add class jquery
$(window).scroll(function() {    
    var scroll = $(window).scrollTop();
    if (scroll >= 500) {
        $(".clearHeader").addClass("darkHeader");
    }
});

Related Post