[jQuery] Re: question about each function

2009-04-14 Thread MorningZ
As Leeoniya notes: $(input:text).each(function(){ if(something happened) { return false; } }) On Apr 14, 8:59 pm, Leeoniya wrote: > wait, you should be doing "return FALSE" rather than just "return" > > On Apr 14, 7:57 pm, Leeoniya wrote: > > > well according tohttp://docs.jquery.com/Core/

[jQuery] Re: question about each function

2009-04-14 Thread Leeoniya
wait, you should be doing "return FALSE" rather than just "return" On Apr 14, 7:57 pm, Leeoniya wrote: > well according tohttp://docs.jquery.com/Core/each > returning false SHOULD break out of the loop, haven't tried it tho - i > can't imagine something like this would be broken at this point, m

[jQuery] Re: question about each function

2009-04-14 Thread Leeoniya
well according to http://docs.jquery.com/Core/each returning false SHOULD break out of the loop, haven't tried it tho - i can't imagine something like this would be broken at this point, maybe your condition is never being met? On Apr 14, 7:51 pm, Leeoniya wrote: > i, too, am curious how to brea

[jQuery] Re: question about each function

2009-04-14 Thread Leeoniya
i, too, am curious how to break out of a .each() loop. On Apr 14, 7:35 pm, jack wrote: > Hi, all > > See the following. > > $(input:text).each(function(){ >     >    if(something happened) return; >    --- >    --- > > }) > > I found the 'return' only exit form a particular input element. An