No need JavaScript to do this. Just use :hover pseudo-class

the css:

.input {
    position: relative;

.tooltip {
    display: none;
    padding: 10px;

.input:hover .tooltip {
    background: blue;
    border-radius: 3px;
    bottom: -60px;
    color: white;
    display: inline;
    height: 30px;
    left: 0;
    line-height: 30px;
    position: absolute;

.input:hover .tooltip:before {
    display: block;
    content: "";
    position: absolute;
    top: -5px;
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid blue;


<div class="input">
    <input type="text" />
    <span class="tooltip">Info</span>