What I'm trying to do here is validating HTML table. I need at least one checkbox to be checked before proceeding. It's doing what it's need to do, except when I don't check a checkbox.
It loops the alert "nothing found" by the count of data on the HTML table. How can I make it better? I need to loop inside the table to get the data on the same row with the checkbox checked.
JS
$('#dataTable').find('tr').each(function () {
var row = $(this);
if (row.find('input[type="checkbox"]').is(':checked') ) {
alert "found"
//im getting data here.
});
}else{
alert "NOthing found"
};
});