JSFiddle - React, Tailwind, and code Playground

HTML

<div class="sourceItem" >ClickMe</div>
<div class="big"> blah blah blah</div>
<div class="big"> blah blah blah</div>
<div class="big"> blah blah blah</div>
<div class="big"> blah blah blah</div>
<div class="big"> blah blah blah</div>
<div class="big"> blah blah blah</div>
<div id="targetItem"> here we are</div>

CSS

.big{
    height:500px;
    font-size: 2em;
}
.sourceItem{
    position:fixed;
    width:100%;
    background-color: #ddd;
}

JavaScript

$(".sourceItem").click( function() {
    //$(window).scrollTop($("#targetItem").offset().top);
   $('html, body').animate({scrollTop: $("#targetItem").offset().top}, 2000);
});