JSFiddle - React, Tailwind, and code Playground

by jdmiller82

JavaScript

(function($){
    
// The DOM is now ready
$(function() {
    
    $('input[type=checkbox]').click(function(){
        $(this).toggleClass('checked');
    });

});

})( jQuery.noConflict() ); // Pass in jQuery so we can safely use the $ alias within this block