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');
}
});