Again, I'm brand new to jQuery, and there are many more things that seem simple, but make me loop for hours.
Now I'm trying to replace the target of the link. I know how to do it. But the fact is that the goal should change depending on the div currently being displayed.
Here's the wireframe:

The link, of course, is located on the arrow, which is fixed at the bottom of the viewport. You may have already guessed, I want the link to point to # div2 when the visitor is on # div1, to # div3 when they are on # div2, etc ...
I thought of several ways to do this:
1) Instead of referencing a div, an arrow can simply call up a scroll of X pixels. Since all divs should be the same height, this will work. Only the user could scroll himself with his mouse at any time, and not click on the arrow. And if they do, pressing the arrow afterwards is likely to lead them to the middle of nowhere.
2) I could replace the target of the link, depending on which div is hanging. But this will cause two more problems: the link will not be replaced at all on mobile devices, and it simply wonβt be replaced when the cursor itself does not vibrate, since it is fixed and above everything else.
Thus, the ideal solution would in fact replace the target of the link depending on the percentage of divs displayed: the link would have a target # div3 if more than 50% of # div2 is displayed.
I think that would be the perfect solution. But I have no idea how to do this. ^^
I would really appreciate any help. :-)
Thanks in advance!
edit: Actually, now that I am thinking about this, the solution should not replace the target of the link if more than 50% of the specific div is displayed. The sections are 1100 pixels high, so if someone with a screen definition lower than this (most people) goes to the site, this will cause problems. Thus, the script should actually replace the target of the link with # div3 if the visible height of # div2 is greater than the height of # div3. I don't know if this decision will make the decision easier .: - /