I am utilizing Bootstrap 4.
After implementing a smooth scroll feature, I had to adjust it by 80px due to my fixed navbar at the top.
$('#navbar').find('a').click(function (event) {
event.preventDefault();
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top - 80
}, 750);
});
However, I am struggling with adjusting Bootstrap's active class on the links. The class is only applied when the anchored section reaches the top of the browser screen, but my navbar overlaps.
Do you have any suggestions?
Thank you for your assistance!