JSFiddle - React, Tailwind, and code Playground

by slace

HTML

<div class="scroll">
    <table border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>Hello</td>
        </tr>
        <tr>
            <td>World!</td>
        </tr>
    </table>
</div>

CSS

.scroll {
 height: 40px;
  overflow:scroll;  
    width:100px;
}

td {
 font-size:18px;
  line-height:20px;  
}

JavaScript

$('tr td').focus(function(e) {
  console.log($(this).offset());
});