JSFiddle - React, Tailwind, and code Playground

HTML

<p id="experiment"><span class="21232">an example</span> of what <span class="332423">
I'm talking</span> about.  There are span's with <span class="21232"> generated
ID's </span>.<span class="21232">an example</span> of what <span class="332423">
I'm talking</span> about.  There are span's with <span class="21232"> generated
ID's </span>.</p>

JavaScript

$('p#experiment > span').hover(function(){
    $('.' + $(this).attr('class')).css('border', '1px solid red')
        },function(){ $('.' + $(this).attr('class')).css('border', 'none') })