Im working on a parallax site which is quite long (e.g. 12k pixels). I want to create a list of scroll points that I think will improve the user interface.
What I think I need to do: 1) create an array that will consist of scroll points, for example, 0px 850px 1300px 2000px 2500px (since it would be simple enough so that I can understand :) 2) on keydown keyCode == 37 move (animate) to the previous point, on keyCode == 39 or keyCode == 32 go to the next point 3) if its the first scroll point, do not go to the previous one, since it does not exist, the same with the last scroll point
Can anyone care for me a bit how to write code? This is the first time I will use javascript / jquery (or programming in general)
source
share