jQuery get position of element relative to another element
<p>So I have a div like:</p>

<pre><code>&lt;div class="uiGrid"&gt;

&lt;div class="trigger"&gt;&lt;/div&gt;

&lt;/div&gt;
</code></pre>

<p>And I want to know the position of trigger to uiGrid and have tried both these:</p>

<pre><code>$('trigger').offset('.uiGrid');

$('trigger').position('.uiGrid');
</code></pre>

<p>but neither get it. Offset is relative to the document and position is relative to the parent and not the specified element.</p>

<p>How would I do this?
Thanks</p>
