JSFiddle - React, Tailwind, and code Playground

HTML

<div id="bar">

<table id="foo">

</table>
</div>

CSS

#bar { height : 200px; 
overflow: auto;}

JavaScript

$( function(){
 for(i=0; i<100; i++){
 $('#foo').append('<tr><td>num : </td><td><a ><input name="fff" type="submit" value="+"></a></td></tr>');
  }
 
 $('#bar').on('click','[name="fff"]' , position );
 
 function position()
{    
 alert( $('#bar').scrollTop() );
} 
 
 })