JSFiddle - React, Tailwind, and code Playground
by Behseini
HTML
<div id="sc">
<table id="mytable">
</table>
</div>
<button class="25">Scrool to 25</button>
<button class="75">Scrool to 75</button>
<button class="125">Scrool to 125</button>
<button class="199">Scrool to 199</button>
<button class="0">Scrool to 0</button>
CSS
.highlighted{color:red;}
#sc {
border:1px solid black;
width:450px;
max-height:100px;
overflow:scroll;
overflow-y: scroll;
overflow-x: hidden;
}
JavaScript
$( document ).ready(function() {
for ( var i = 0; i < 200; i++ ) {
$('#mytable').append('<tr class='+i+'><td>This is Row'+i+' </td></tr>');
}
});