I have a simple table:
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
and I need to get offset of cell on which cursor is hovered on jQuery
<table>
<tr>
<td>One</td>
<td>Two</td>
</tr>
<tr>
<td>Three</td>
<td>Four</td>
</tr>
</table>
$('td').mouseover(function() {
var ofst = $(this).offset();
$('div').html('(' + ofst.top + ', ' + ofst.left + ')');
});