JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#">test 1</a>
<a href="#">test 2</a>
<button>another test</button>
<span id="log" />

JavaScript

$("*").mouseenter(function() {
    $("#log").text($(this).attr("name"));
});