JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li class="menuitem" id="myTag">
<a id="lnk-1" href="#" class="menu-item-a">Click here to apply
<span class="menu-item-span"></span>
</a>
</li>
</ul>
CSS
.menuitem{
width: 200px;
height:30px;
background-color: #005abb;
font-size:16px;font-family: 'gotham_htfbold';-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
.menuitem a{
width: 200px;
height: 30px;
height: auto;
display: block;
position: relative;
color: #FFF;
text-align: center;
z-index: 9999;
}
.menu-item-span{
display: none;
width: 200px;
height: 30px;
background-color: #fff;
bottom: 0;
left: 0;
position: absolute;
right: 0;
top: 0;
color:#005abb;
z-index: -999;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
JavaScript
$(function() {
$(".menuitem").find("class")
.hide() // Finds span hide.
.end() // After find stop.
.hover(function() { // On hover find and fadein then fadeout
$(this).find("span").stop(true, true).fadeIn();
}, function() {
$(this).find("span").stop(true, true).fadeOut();
});
});