Possible Duplicate:
How to break/exit from a each() function in JQuery?
I want to exit the jQuery .each
loop on some condition, How can I do it. Will exit;
code work?
var r = true;
$('.hour').each(function() {
var $hours = $(this).val();
if ($hours == "") {
alert(" Active Time is required");
r = false;
//exit;
}
});
return r;