Remove class giving transition effect

0

I have a class called 'fixed' with a transition in it, when I add this class it does a transaction, the problem is that when I remove this class, it is being removed very grossly, I do not know how to proceed a transaction effect also at the output of this class, the fixed class has a 1-second all-linear transition:

var menu = $('.fixa').offset().top + 10;
var $meuMenu = $('fixa');
$(document).on('scroll', function () {
    if (menu <= $(window).scrollTop()) {
        $('.fixa').addClass('fixed');
    } else {
        $('.fixa').removeClass('fixed');
    }
});
    
asked by anonymous 16.01.2017 / 21:06

0 answers