JSFiddle - React, Tailwind, and code Playground
JavaScript
$("body").append('<a href="https://www.google.com" id="exp" target="_blank">Link</a> <a href="https://www.google.com" id="exp2" target="_blank">Otro link</a>');
$(document).on("click", "#exp", function(ev){
ev.preventDefault();
alert("El evento se detuvo");
});
$(document).on("click", "#exp2", function(){
alert("No se detendrá");
});