JSFiddle - React, Tailwind, and code Playground
HTML
<div class="test01"></div>
<br />
<div class="test02"></div>
CSS
[class*="test"] {
width: 100px;
height: 100px;
display: block;
background: #cccccc;
}
[class*="test"]:hover,
.hover{
background: red;
}
JavaScript
$('.test01').hover( function() {
$('.test02').addClass('hover');
}, function(){
$('.test02').removeClass('hover');
});