JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#">Click me!</a>
<span id="target"></span>
JavaScript
$(document).ready(function() {
function foo(){
writeNumber = $("#target");
setTimeout(writeNumber.html("1"),1000);
setTimeout(writeNumber.html("2"),2000);
//setTimeout(writeNumber.html("3"),3000);
};
$('a').click(function() {
foo();
});
});