It appears that the example provided changes the color from red to blue from the bottom, but I am looking for a solution that will change the color from top as I scroll. Can anyone help me achieve this effect using JavaScript? Here is another great reference example where scrolling changes a gray line into red.
<div id="scroll1"></div>
<div id="scroll2"></div>
CSS portion:
#scroll1 {
background-color: red;
width: 50px;
height: 800px;
}
#scroll2 {
background-color: blue;
width: 50px;
height: 800px;
}