JSFiddle - React, Tailwind, and code Playground
by dmethvin
HTML
<input
type="checkbox" value="yes" onclick="search_form_select(this)"
/>
<span onclick="$(this).prev().click();">Search</span>
JavaScript
// #5951 (1.3.2 vs current)
// Notice the difference in check box state at the point the alert shows when 1.3.2 is used vs current. Direct click on the input is handled first by the browser and passed to jQuery, but click on Search synthesizes a click event.
search_form_select = function(tgt){
if($(tgt).attr("checked")){
alert(true);
}else{
alert(false);
}
}