[jQuery] Re: How to terminate each befor full iteration

2007-06-17 Thread Mike Alsup
Return false to stop the iteration loop. Mike On 6/17/07, wyo <[EMAIL PROTECTED]> wrote: I'd like to terminat (beak) the iteration in the following code if a value is emtpy. Is that somehow possible? var okay = true; $('.input_required').each (function (i){ if ($(this).val() == "")

[jQuery] Re: How to terminate each befor full iteration

2007-06-17 Thread Matt Stith
if (!okay) return; maybe? :P On 6/17/07, wyo <[EMAIL PROTECTED]> wrote: I'd like to terminat (beak) the iteration in the following code if a value is emtpy. Is that somehow possible? var okay = true; $('.input_required').each (function (i){ if ($(this).val() == "") { okay = fal