JSFiddle - React, Tailwind, and code Playground

HTML

<div id="spacer"></div>
<div id="comment">Scroll to this comment</div>

CSS

#spacer { height: 700px; width: 100%; background-color: #888; }
#comment { height: 50px; color: white; width: 100%; background-color: #444; margin-top: 20px; }

JavaScript

$(document).ready(function(){
	var commentid = "comment";
	//document.getElementById(commentid).scrollIntoView();
	$(commendid).css('background-color', 'red');
});