JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" id="ho">Click Me</a>
<div class="hi"></div>
JavaScript
$('#ho').on('click', function(e){
e.preventDefault();
$('.hi').append('<input type="checkbox" id="isAgeSelected"/>');
})
$(".hi").on('click',"input[type=checkbox]",function () {
if(this.checked){
alert('is checked')
}
})