I'm trying to fix a nav bar after a x point on scroll, but it's not working, can anyone help me? (i'm new, so take it easy)
$(document).on('scroll', function (event) {
if (document.body.scrollTop > 550 || document.documentElement.scrollTop > 550) {
$('.nav_bar').addClass('navbar-fixed');
}
else {
$('.nav_bar').removeClass('navbar-fixed');
}
}
});