JSFiddle - React, Tailwind, and code Playground

HTML

<div class='myDiv'></div>

CSS

.myDiv{
    background-color: red;
    width: 200px;
    height: 200px;  
    opacity: 0.4;
filter: alpha(opacity=40); /* For IE8 and earlier */
    cursor: pointer;
}

JavaScript

$('.myDiv').mouseenter(function(){
    $(this).stop();
    $(this).fadeTo('slow', 1);

});
$('.myDiv').mouseleave(function(){
    $(this).stop();
$(this).fadeTo('slow', 0.4);
});