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(function(){writeNumber.html("1")},1000);
    setTimeout(function(){writeNumber.html("2")},2000);
    setTimeout(function(){writeNumber.html("3")},3000);
    };

$('a').click(function() {
 foo();
});

});