Currently studying web design, I am working on creating a parallax website. I have managed to slow down the scrolling background in certain areas, but I want to enhance it by adding buttons in the header that will smoothly scroll the page to a specific Div section instead of instantaneously jumping to it.
Here is the HTML for my header:
<header>
<h1>Stalwarts</h1>
<div id='taskbar'>
<a href="#p" class="scrollTo">Go to section 1</a>
<a href="#d" class="scrollTo">Go to section 2</a>
<a href="#t" class="scrollTo">Go to section 3</a>
<a href="#q" class="scrollTo">Go to section 4</a>
</div>
</header>
Here is the CSS code I am using:
header{
position: fixed;
padding-top: 0.4%;
padding-bottom: 0.4%;
top: 0;
width: 100%;
height: auto;
z-index: 55;
}
I would like guidance on how to implement JS or JQuery to achieve the smooth scrolling effect and how to integrate it into my project. If any plugins are necessary, I would appreciate instructions on how to install them as I am relatively new to JQuery and JS!
Thank you, Christophe