Say I have the following code:
<div style="height: 50px; width: 50px; background: black"></div>
<table id="pets" class="table-border" style="width: 800px; margin-top: 1em; border-collapse: collapse">
<tr>
<td>Name</td>
<td>Breed</td>
<td class="highlightTop">Age</td>
</tr>
<tr>
<td><input type="text" name="petName" style="width: 100%"/></td>
<td>...</td>
<td class="highlight"><input type="numbers" name="age" style="width: 100%"/></td>
</table>
When I do $('#pets .highlightTop').position().top
I get 0 back. Why? The fact that there's a 50px tall div above the table should mean that it's at least 50, should it not?
Since it isn't 50, how can I get the actual position of the element?
Thanks!