I want to use $.each inside a function. But i have problems with the return value, which should be overwritten in the each function.
function validate_voting_stars() {
$error = false;
$.each( $('input.rr'), function(index,value){
vote = $(this).val();
if( $.isNumeric($(this).val() ) && vote < 6 ) {
return;
} else {
$error = true;
}
})
return $error;
}
I think, that the firing of the return value is not waiting for finishing the each function of jQuery. Is there a way, how i can solve this? For testing i added the return inside the each function, but this is not working too
Any ideas?