How To Get the Selected Checkboxes within a class in Jquery?

#option-1::

$('.tbl_prop_checkbox .prop_checkbox:checked').each(function(){
    var dis_service = $(this);
    console.log(dis_service);
});
#option-2::

$.each($(".tbl_prop_checkbox input.prop_checkbox:checked"), function(){            
    var dis_service = $(this);
    console.log(dis_service);
});
#option-3:: To Get if Chcekbox is Checked

$('.tbl_prop_checkbox .prop_checkbox').each(function(){
    var dis_service = $(this);
      
    if(dis_service.is(':checked')){
        console.log('checked service');
    }else{
        console.log('Not checked service');
    }
});

Leave a Comment