JSFiddle - React, Tailwind, and code Playground
by gmcalab
HTML
<div style="height: 50px"></div>
<a name="test" id="test3">Hello</a>
<div style="height: 600px">foo bar</div>
<input type="button" id="yes" value="do it"/>
<a href="#test" id="test4">gere</a>
JavaScript
$(document).ready(function(){
$('#yes').click(function(){
$('html,body').animate({
scrollTop: $('#test3').offset().top
});
});
});