JSFiddle - React, Tailwind, and code Playground

HTML

<a>text</a>

CSS

.hover {
    background-color: yellow;
}

JavaScript

$('a').hover(function () {
  $(this).fadeOut(0).addClass('hover').fadeIn(300);
},
function () {
  $(this).stop(0,0)
         .fadeOut(300)
         .queue(function(){ $(this).removeClass('hover').fadeIn(0).dequeue() });
});