Q:

Get rows with checked boxes in a table

So I am trying to find the rows with a checked box and then grab a column value form that row. Here is what I have so far:
$('#myTable tbody tr').each(function () {
    var chckbox = $(this).find('.checkItem');
    if (chckbox.checked) {  
    ids.push($(this).find(".id").html());
    }
});

The problem right now is it never gets inside the if statement. The class names are all correct.

A:

$('#myTable tbody tr').each(function () {
    var chckbox = $(this).find('.checkItem');
    if (chckbox.prop('checked')) {  
        ids.push($(this).find(".id").html());
    }
});

jQuery .prop

