JSFiddle - React, Tailwind, and code Playground
HTML
<span id="confirm"><a href="#">Delete</a></span>
JavaScript
$(function() {
$("#confirm").click(function() {
$(this).html('Are you sure? <a href="#">Yes</a> / <a id="unconfirm" href="#">No</a>');
});
$("#confirm").on("click", "#unconfirm", function(e) {
e.stopImmediatePropagation();
$(this).parent().html('<a href="#">Delete</a>');
});
});