jQuery position().top returns 0 rather than real value
<p>According to the jQuery official documentation, this function should:</p>

<p><strong>"Get the current coordinates of the first element in the set of matched elements, relative to the offset parent."</strong></p>

<p>The following code is expected to return value 51, but it returns value 0. Could anyone provide insight as too why? Thanks in advance.</p>

<p>I know that adding css(top:xx) works, if so, does that mean position() only work for the case the element has the css property of top?</p>

<pre><code>&lt;html&gt;

&lt;head&gt;
    &lt;style type="text/css"&gt;
        .outer
        {
            width:200px;
            height:200px;
            overflow-y:auto;
            border:1px dotted grey;
            position:absolute;
        }
        .inner
        {
            width:50px;
            height:50px;
            margin-top:  50px;
            border:1px solid red;
        }
    &lt;/style&gt;
    &lt;script type="text/javascript" src="jquery-1.7.2.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript""&gt;

        $(document).ready(function () {
            $('.inner').mousedown(function (e) {
                alert($(this).position().top);
            })
        })
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

    &lt;div class="outer"&gt;
        &lt;div class="inner"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
