我有多组这样的复选框:
<input type="checkbox" class="correction_check" product_id="3" defect_col="Qty">
<input type="checkbox" class="correction_check" product_id="3" defect_col="Exp">
<input type="checkbox" class="correction_check" product_id="3" defect_col="Bat">
<input type="checkbox" class="correction_check" product_id="4" defect_col="Qty">
<input type="checkbox" class="correction_check" product_id="4" defect_col="Bat">
一组复选框由 区分product_id
。
我可以做这样的事情吗?
$('.correction_check').click(function(){
//check if all other check boxes having same product_id as $(this) are checked and do some action
});