JSFiddle - React, Tailwind, and code Playground
HTML
<h1 id="first">First header</h1>
<h1 id="second">Second header</h1>
JavaScript
$("#first").mouseover(function(){
$("#second").css({
'background-color' : '#ccc'
});
}).mouseout(function() {
$("#second").css({
'background-color' : 'transparent'
});
});
$("#second").mouseover(function(){
$("#first").css({
'background-color' : '#ddd'
});
}).mouseout(function() {
$("#first").css({
'background-color' : 'transparent'
});
});