JSFiddle - React, Tailwind, and code Playground
HTML
<button id="showConfirm" type="button">Click me</button>
<div id="customConfirm" style="position:absolute;left:50%;top:50%;display:none;">
<div>Confirm?</div>
<button type="button" value="yes">Yes</button>
<button type="button" value="no">Cancel</button>
</div>
JavaScript
$(function(){
$('#showConfirm').click(function(){
$('#customConfirm').toggle();
});
$('button[value]').click(function(){
alert('Clicked '+this.value); //Do whatever you want with this.value here
$('#customConfirm').toggle();
});
});