JSFiddle - React, Tailwind, and code Playground
by adam smth
HTML
<div id="div1" class="normal" onmouseover="change()" onmouseout="changeBack()"></div>
<div id="div2"></div>
<script>
function change(){
document.getElementById("div2").className='active';
}
function changeBack(){
document.getElementById("div2").className='normal';
}
</script>
CSS
#div1, #div2{width: 50%; height: 200px; float: left;}
#div1{background-color: red;}
#div2{background-color: blue;}
#div2.normal{background-color: blue;}
#div2.active{background-color: green;}