JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript">
$(document).ready(function() {
$("a.Link").click(function() {
$("html, body").animate({
scrollTop: $($(this).attr("href")).offset().top + "px"
}, {
duration: 500
});
return false;
});
});
</script>
<a href="#anchor" class="Link">Call to action</a>
<div style="background: #777; height: 3000px;"></div>
<a id="anchor"></a>