JSFiddle - React, Tailwind, and code Playground

HTML

<div id="ton_id"><a class="test">test</a>
</div>

CSS

.test {
    background:#ccc;
}

JavaScript

$('.test').click(function () {
    alert("click success");
    $('#ton_id').append(' <br>------------<br> <a class="test">Si tu clic sur le nouveau lien, cela marche, mais si tu supprime le .on cela ne marche plus.</a>');
});

$("#ton_id").on("click",".test", function(){
  alert("on success");
});