JSFiddle - React, Tailwind, and code Playground
by Praveen Kumar Purushothaman
HTML
<a href="#one">One</a>
<a href="#two">Two</a>
<div id="one">One</div>
<div id="two">Two</div>
<div id="hash"></div>
CSS
div.selected {background: #ff0;}
JavaScript
$(document).ready(function(){
var hash = window.location.hash;
$("#hash").html(hash);
$("div").removeClass("selected");
$(hash).addClass("selected");
});