JSFiddle - React, Tailwind, and code Playground

HTML

<div class="a">Box A
</div>
<div>another box
</div>
<div>another box
</div>
<div>another box
</div>
<div class="b">Box B
</div>

CSS

.c { background-color:red; }

JavaScript

$( document ).ready(function() {
	$(".b").hover(
  		function() {
    	$(".a").addClass("c");
  		}, function() {
    	$(".a").removeClass("c");
  	}
);
});