A future solution using scroll-behavior: smooth. UPDATE! As correctly pointed out by Šime Vidas there is another solution. There is a property of the CSSOM View module called scroll-behavior. This is a native solution for the problem that I'm trying to solve by my script. Simon Codrington explains how to use jQuery and CSS3 to add scroll-based animations to your site and thereby offer your users a more engaging experience. ... We want fast and smooth animations ... , fullPage plugin by Alvaro Trigo. Create fullscreen pages fast and simple. One page scroll sections jquery plugin. Mouse snap. , Additionally, with position:sticky you aren't writing to the DOM during scrolling, so you won't be causing any forced layouts & layout recalculations. As a result, the browser is able to move this operation to the GPU and you get very smooth scrolling even when sticky elements are in play. Ecu carsThe idea here is to toggle the .active class to the sidebar on clicking the toggle button. By default, the sidebar will appear, i.e. it hasn't got .active class yet. After clicking the toggle button, the sidebar will be given an .active class, and pushed out from the screen. The page content will take the full-screen width too. Additionally, with position:sticky you aren't writing to the DOM during scrolling, so you won't be causing any forced layouts & layout recalculations. As a result, the browser is able to move this operation to the GPU and you get very smooth scrolling even when sticky elements are in play.
Jump menu with active class and smooth scroll codepen
This is useful when you feel that the links inside the navbar changes the active state too soon or too early when jumping to the scrollable elements. Default is 10 pixels. Requires relative positioning: The element with data-spy="scroll" requires the CSS position property, with a value of "relative" to work properly. You can see, just the class navbar-fixed-bottom is used in the <nav> section of code. A fixed and static top menu. In order to make a top bar menu which is fixed as well, that means, if you scroll down the page, the menu bar will be fixed and visible across. For that, simply use the navbar-static-top class in the <nav> tag i.e.