JSFiddle - React, Tailwind, and code Playground
by Narendra Lakhtariya
HTML
<input type="checkbox" name="Latest Product" desc="Select if you want to display latest product" id="PROD_checkbox1" > Latest Product1<br />
<input type="checkbox" name="Latest Product" desc="Select if you want to display latest product" id="PROD_checkbox2" >
Latest Product 2<br />
<input type="checkbox" name="Latest Product" desc="Select if you want to display latest product" id="PROD_checkbox3" >Latest Product 3<br />
JavaScript
electronics = 'blah...';
$('input:checkbox').each(function(){
$(this).attr('onclick', 'alert(electronics + this.checked);');
});electronics = 'blah...';
$('input:checkbox').each(function(){
$(this).attr('onclick', 'alert("electronics = " + electronics +" : checked = "+ this.checked);');
});
function chk(electronics, checked){
alert('electronics = ' + electronics +' : is checked = '+ checked);
}