I have implemented the following HTML structure:
<div style="height:200px;overflow-y:scroll;">
<table>.....</table>
</div>
By using this setup, I am aiming to replicate the functionality of an expanded <select>
control with the @size attribute specified. This will allow users to select a row in the table. Is there a way to instantly move the table so that the selected row is at the top of the div and the vertical scrollbar is adjusted to match its position? There is no need for a smooth scrolling effect, the table should immediately change its position upon clicking on a row.