i, too, am curious how to break out of a .each() loop.

On Apr 14, 7:35 pm, jack <datac...@gmail.com> 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. And it
> won't return from "each" function. It always go through every
> element. I mean if something happened I don't want to go any further
> elements and just exit from "each" function. Is there any way to do
> that? Thank you in advance!

Reply via email to