JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li class="parent">
        <img src="http://placehold.it/100x100" class="img" />
        <span class="button">Наведи на изображение</span>
    </li>
    <li class="parent">
        <img src="http://placehold.it/100x100" class="img" />
        <span class="button">Наведи на изображение</span>
    </li>
</ul>

CSS

.active {
    color: red;
}

JavaScript

$('.img').hover(function () {
    $(this).parent('li').find('.button').toggleClass('active');  
});