JSFiddle - React, Tailwind, and code Playground
HTML
<p>Lorem ipsum ador abmium abset.<br />
The quick brown fox <a href="#" class="hasTooltip">jumped</a><span>Did he really jump, or was this fake? I'm not sure. Do some research on this later.</span> hastily over the obese, lazy <a href="#" class="hasTooltip">dog</a><span>Lots of dogs.</span>.
</p>
<p>
testsetsetst
</p>
CSS
.hasTooltip + span {
display:none;
}
.showTooltip {
background-color: gray;
color: blue;
padding:5px;
margin-left: 3.3em;
position: absolute;
max-width: 200px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
JavaScript
$('.hasTooltip').hover(function() {
var offset = $(this).offset();
$(this).next('span').fadeIn(200).addClass('showTooltip');
$(this).next('span').css('left', offset.left + 'px');
}, function() {
$(this).next('span').fadeOut(200);
});