JSFiddle - React, Tailwind, and code Playground

by taylorRichie

HTML

<a href="javascript:gotoAdviseeList();" id="gotoAdviseeListLink" class="view-roster">View Roster</a><label id="test" title="No People Here" for="gotoAdviseeListLink"></label>

CSS

body{font-family: arial, sans-serif;}

span{display:inline-block;}

label{display: inline-block;}

.ui-tooltip {
	position:absolute;

	background-color: #FFF6CF;
	border: 1px solid #C3A876;
	color: #333;
	opacity:0;

	width: auto; 
	height: auto;
	margin: 20px; 
	padding: 10px;

	box-shadow: 0 1px 2px rgba(0,0,0,.3);
}

.ui-tooltip:after, .ui-tooltip:before {
	right: 100%;
	border: solid transparent;
	content: " ";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
}

.ui-tooltip:after {
	border-color: rgba(255, 246, 207, 0);
	border-right-color: #FFF6CF;
	border-width: 10px;
	top: 50%;
	margin-top: -10px;
}
.ui-tooltip:before {
	border-color: rgba(195, 168, 118, 0);
	border-right-color: #C3A876;
	border-width: 11px;
	top: 50%;
	margin-top: -11px;
}

JavaScript

$(function(){
    $("label").tooltip({
      show: true,
      position: {
        my: "left+20 center",
        at: "right center"
      }, open: function( event, ui ) {
        ui.tooltip.animate({ 
            opacity:1,
            left: ui.tooltip.position().left - 10
        }, 200 );
      }
    });
   
   $('#gotoAdviseeListLink').mouseover(function(){
       $('label').tooltip("open");
    })
});
$('label').tooltip("open");