Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAbe Layee
8,378 PointsHow 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.
3 Answers
geoffrey
28,736 PointsOk, 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.
Abe Layee
8,378 PointsYes, that is what I want to achieve.
Abe Layee
8,378 PointsThank you very much bro.
geoffrey
28,736 Pointsgeoffrey
28,736 PointsI guess you want it to scroll down to the next section of your webpage and stop there ? (As I suppose It's a one page website).