JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="sameAsCheckbox" />
JavaScript
$("#sameAsCheckbox").click(function() {
if($(this).is(':checked')) {
alert("fancybox!")
$('#deliverydetails').fancybox('');
}
})