Smooth scrolling conflict between Bootstrap5 and jQuery

Bootstrap5 has scroll-behavior: smooth by default. This provides a smooth scrolling behavior when clicking on links within a page. However, this setting may conflict with smooth scrolling by jQuery.

To avoid this conflict, you can disable smooth scrolling in Bootstrap using the following CSS

:root { 
 scroll-behavior: auto !important; 
}

This will allow the smooth scrolling functionality with jQuery to work correctly.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top