JSFiddle - React, Tailwind, and code Playground
HTML
<div style="width:900px; overflow:auto" id="container">
<table width="4000px" border=2>
<tr>
<td><a href="javascript:void(0)" id="1" class="a" >test1</a></td>
<td><a href="javascript:void(0)" id="2" class="a" >test2</a></td>
<td><a href="javascript:void(0)" id="3" class="a" >test3</a></td>
<td><a href="javascript:void(0)" id="4" class="a" >test4</a></td>
</tr>
</table>
</div>
JavaScript
$(".a").click(function(){
var pos = $(this).position();
while(pos.left >0){
pos = $(this).position();
$("#container").scrollLeft($("#container").scrollLeft()+1);
}
})