JSFiddle - React, Tailwind, and code Playground
by luizpaulo165
HTML
<tr>
<td><input id="motivo_est" type="checkbox" class="check-input" name="motivo[]" value="Sem estoque" />Sem estoque</td>
<td><input id="motivo_ind" type="checkbox" class="check-input" name="motivo[]" value="Item idisponivel" />Item idisponivel</td>
<td><input id="motivo_sem" type="checkbox" class="check-input" name="motivo[]" value="Sem motivo" />Sem motivo</td>
</tr>
JavaScript
$(function(){
function changeInput(elem){
elem.each(function(){
var self = $(this);
if(self.is(':checked')){
alert(0)
}
});
}
$('.check-input').change(function(){
var self = $(this);
changeInput(self)
});
});