I study in web-making, and I need to do a parallax kind of website. I achieved to make the background scrolls slower where it was needed, but I'd like to improve it with buttons in the header that would make the page scroll to a choosen Div, and not just "teleport" you there.
So this is my HTML for the 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>
And there's my CSS:
header{
position: fixed;
padding-top: 0.4%;
padding-bottom: 0.4%;
top: 0;
width: 100%;
height: auto;
z-index: 55;
}
I would like to know how i can make either JS or JQuery to make this works and please how to integrate it. If plugins are needed, could you help me with how to instal them? I just begin with JQuery and JS! :-)
Thank you, Christophe