JSFiddle - React, Tailwind, and code Playground

HTML

<div class="content"></div>

CSS

div.content{
    border:1px solid red;
    height:50px;
}

JavaScript

var tool = "";
			tool +=	'<div class="toolTip" id="toolTip">';
            tool +=    '<a href="#" class="btn btn-info saveText btn-xs copy">Save Text</a> </div>';
    
var rightButton =  $(tool).clone();

var i = 0;

var button = $('a.saveText');

$('div').mouseenter(function(){
    rightButton.appendTo('body');
})

button.click(function(e){
    console.log(++i);
    e.preventDefault();
    $(this).remove();
})