how can i break from jquery each with out return FALSE.
consider the following
function check_quantity(){
var _q = $(".quantity");
_q.each( function(){
if( some_condition ){
break; // I WANT TO BREAK HERE AND NEED TO RETURN A TRUE INSTEAD OF FALSE
// for some reasons there is no way to continue
}
} );
return FALSE; // if condition failed
}
is there any work around ?
Without changing your function, just set a flag to true in your loop if you get what you want in it.