JSFiddle - React, Tailwind, and code Playground

HTML

<input type="color" id="myelement"  />

JavaScript

$('#myelement').bind('initCheckboxes change', function() {
     var a = $('#myelement').val();
     alert(a);
}).trigger('initCheckboxes');


/*
 * Try clicking the checkbox, it fires 1x
 * Try hitting space after the click (so the box is selected),
 *   again, it fires once.
 */