I\'m using Bootstrap 4, and am using the following jQuery to allow smooth scrolling from the .nav-links to section id\'s (within the same page):
$(\'.nav-link\')
Its working fine with bootstrap 4 and this code also working fine may be something wrong in your other code.
$('.test, .nav-link, .navbar-brand, .new-button').click(function() {
var sectionTo = $(this).attr('href');
$('html, body').animate({
scrollTop: $(sectionTo).offset().top
}, 1500);
});
test class
navbar-brand class
test class
navbar-brand class