JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#" class="hover">
   hover: make me an underline
   
</a>

<a href="#" class="click">
   click: make me an underline
   
</a>

CSS

a.click, a.hover {
    
    text-decoration: none;
    display: block;
}

JavaScript

$("a.hover").hover(function (){
        $(this).css("text-decoration", "underline");
    },function(){
        $(this).css("text-decoration", "none");
    }
);

$("a.click").click(function (){
        $(this).css("text-decoration", "underline");
    }
);