JSFiddle - React, Tailwind, and code Playground

by karthick Chandran

HTML

<img id="test" src="img.jpg"/> <span>Name</span>

CSS

#test{
        display:none
    }

JavaScript

$(document).ready(function () {
       $('span').on('mouseenter', function () {
           $('#test').show();
           $(this).css({
               "text-decoration": "underline"
           });
       }).on('mouseleave', function () {
           $('#test').hide();
           $(this).css({
               "text-decoration": ''
           });
       });;
   });