There is also an image (a down arrow), that I want to animate to face upwards when the page reaches a certain point. I have a function to scroll to the bottom, but I can’t figure out how to end the function. I am very new with javascript and obviously not that good at it.
Here is a link to the fiddle file: http://jsfiddle.net/thindjinn/LCYEp/embedded/result/
Enjoy Anderson Cooper as my poster. I was just testing the code. 😀
On a sidenote: Instead of
setTimeout(), usesetInterval(). It eliminates the need of a recursive function.To stop the page from scrolling any further, just call
clearInterval().