In a loop I have some checkboxs that I set a class name :
class="ids[]"
Because my loop is inside a form,at first time I want to find out any checkbox
is check or not.
var ids = new Array();
$('.ids[]').each(function(index, element) {
if(this.checked) {
ids.push($(this).val());
}
});
if(ids.length == 0 ) {
alert('not checked any checkbox');
return false;
}
$('.ids[]').each...
not fetch anything.