vendredi 26 août 2016

Velocity.js fires off fadeOut but not fadeIn

I have the following code It should

if($(window).scrollTop()!=0){
        console.log('doout');
        $("#topbottom").velocity("fadeOut", { delay: 500, duration: 1500 });
    }else{
        console.log('doin');
        $("#topbottom").velocity("fadeIn", { delay: 500, duration: 1500 });
    }
}

It fires off the fadeOut on scroll however it won't fire off the fade in. It does write doin to the console when I get back to scroll zero...

A bit confused.

Thanks

Aucun commentaire:

Enregistrer un commentaire