I have a div element with an overflow, which I want to identify the last element in view. For example if you scroll half way down, how can you get the id of the last element displayed.

<div style="overflow:auto;height:10px;">
...
<tr id="itemID"><td>Last Item within view</td></tr>
...
</div>

Because I don't know which element that might be? I can loop through each item and verify all offsets that are within a given range say offsetHeight +/- 10px. Are there any other ways to do this?

scrollHeight:246
scrollTop:36
offsetHeight: 212