JSFiddle - React, Tailwind, and code Playground
HTML
<div class="image-thumb">
stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff
</div>
CSS
.image-thumb {
width: 150px;
height: 100px;
border: 1px solid #c3c3c3;
}
JavaScript
$(function() {
$(".image-thumb").css("opacity", "0.6");
});
$('.image-thumb').bind('mouseover mouseout', function(event) {
if (event.type == 'mouseover') {
$(this).stop().animate({
opacity: 1
}, "slow");
} else {
$(this).stop().animate({
opacity: 0.6
}, "slow");
}
});