JSFiddle - React, Tailwind, and code Playground

by Afzaal Ahmad Zeeshan

HTML

<div>
    <span class="one">
        First
    </span>
    <span class="one">
      Second  
    </span>
</div>

CSS

.red {
    color: red;
}

JavaScript

$('div').hover(function () {
    $('div .one:first-child').attr('class', 'red');
})