JSFiddle - React, Tailwind, and code Playground
by cmacrander
HTML
Click on the following tags:
<br><br>
<span id="theSpan">span</span>
<br><br>
<a id="theBlankAnchor" href="">a</span>
<br><br>
<a id="theHashAnchor" href="#">a</span>
JavaScript
createTimeout = function() {
alert("onclick executed");
setTimeout(function() {
alert("timeout executed", 100);
});
};
document.getElementById("theSpan").onclick = createTimeout;
document.getElementById("theBlankAnchor").onclick = createTimeout;
document.getElementById("theHashAnchor").onclick = createTimeout;