increasing div height by scrolling

increasing div height by scrolling

Hi everybody,

after days of reading and trying to find out how to solve this problem, I give up and hope that you guys can help me! 

I got one div, let’s say {height: 0px} now if I scroll down the body for 500px I want the height of the div to increase for every px I scrolled for 1px. So that when i finished scrolling the div’s height is also 500px.

I tried many ways to solve this problem. The closest I got was using .scroll and .animate, but it still didn’t bring up the effect I want it to be.

I really really hope somebody can help me!

Thanks in advance,