JSFiddle - React, Tailwind, and code Playground

by dife

HTML

<input type="checkbox" id="isAgeSelected"/>

JavaScript

$("#isAgeSelected").change(function() {
    if(this.checked) {
         alert('ola_1');
    }else{
        alert('ola_2');
    }
});