JSFiddle - React, Tailwind, and code Playground
HTML
<a id='test'>LINK</a>
JavaScript
$("#test").mouseenter(function(){
setTimeout(function(){
$.ajax({
url:"test.php",
success:function(){
alert("success");
},
error:function(){
alert("ERROR");
}
});
},5000);
});