Welcome to the Treehouse Community
Looking to learn something new?
Abe Layee8,378 Points
How do I make my arrow to scroll to the next section on my website?
Hello everyone. How are we all doing today? I need a little bit of a help. I am trying to write a script that allows my arrow on my website to scroll down when you click on it. Here is link to my codepen. http://codepen.io/Layee/pen/oXYXPP My arrow has an id of scrolldown.
Ok, I did it this way, here, hope It's going to help you a little bit. You'll see that, if the last section to go to is reached, if ever you click again on the arrow, It'll go back to the first section.
That might be cool as well to change the appearence of the arrow if the last section is reached, I mean we could orientate this one to the top instead of the bottom.