Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - scroll event with multiple conditions

0 votes
41 views
added Dec 18, 2020 in jQuery by lcjr Second Warrant Officer (3,760 points)
$(window).scroll(function() { 
    if (window.scrollY > 1) {
        HideAppBanner(); 
        adParallax.css({'top': '140px'});
    } else {
        ShowAppBanner();
        if ($(window).width() > 425) {
            adParallax.css({'top': '162px'});
        }
        else {
            adParallax.css({'top': '150px'});
        }
    }     
});

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...