JSFiddle - React, Tailwind, and code Playground

by Pranav C

HTML

<input type="checkbox" id="populatie" name="werking">
    
    <button id="opslaan">b</button>

JavaScript

$("#opslaan").click(function(){    
    if ($("#populatie").prop('checked')) {
    alert('hello'); 
    }     
});