JSFiddle - React, Tailwind, and code Playground
HTML
<div class="parent">
<img src="http://png-3.findicons.com/files/icons/2229/social_media_mini/48/google.png" />
</div>
CSS
.parent{
width:400px;
height:400px;
background:blue;
}
.hovered{
background:red;
}
JavaScript
$(".parent").on("mouseenter mouseout",function(){
$(this).toggleClass('hovered');
});