Element's position().top does not change after scroll - how to get the new position?
<p>I need to get an element's (a div) position (position().top) when the user scrolls the window. The problem is that when I call position().top to get the new position after scrolling, it's got the same value as before scrolling. Here's a bit of code:</p>

<pre><code>$('document').ready(function() {

    alert($('#my-element').position().top);

    $(window).scroll(function() {
        alert($('#my-element').position().top);
    });
});
</code></pre>

<p>How come it doesn't change? Is there a way to get the new fresh value?</p>
