JSFiddle - React, Tailwind, and code Playground

CSS

input {
    width:100px;
}

JavaScript

function showPopup(i) {
    var comp = '<div id="alert"><input type="button" id="proceed" value="proceed'+i+'"><input type="button" id="close" value="close'+i+'"></div>';

    $('body').append(comp);
}

$('#close').live('click', function() {
    console.log(this.value);
    $(this).parent().remove();
});

$('#proceed').live('click', function() {
    //ajax-call
    console.log(this.value);
});

showPopup(1);
showPopup(2);
showPopup(3);
showPopup(4);
showPopup(5);