jQuery's problem with the position method
<p>If I have the following markup:</p>

<pre><code>&lt;div id="parent" style="width: 300px; height: 300px;"&gt;
  &lt;div id="child" style="position: relative; left: 0; top: 0; width: 100px; height: 100px;"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>and I want to get the position of the child relative to its parent, would the only way be as follows?:</p>

<pre><code>x = parseInt($('#child').css('left')); // returns 0 as needed
y = parseInt($('#child').css('top')); // return 0 as needed
</code></pre>

<p>Because if I do the following:</p>

<pre><code>x = $('#child').position().left; // most likely will not return 0 
y = $('#child').position().top; // most likely will not return 0
</code></pre>

<p>the position is wrong due to the fact that the offset method does also add the margin, padding, and border of the grandparents (be it the body element with its default margins or any other grandparent element).</p>

<p>I need to get the right position (in my example it would be <code>0, 0</code>) but I suspect there is no method in jQuery that can calculate it for me?</p>
