Javascript/JQuery: return immediately from PARENT function in call to each() via anon function

Posted by GreenieMeanie on Stack Overflow See other posts from Stack Overflow or by GreenieMeanie
Published on 2010-04-08T17:06:02Z Indexed on 2010/04/08 17:23 UTC
Read the original article Hit count: 487

Filed under:
|

For example:

> function foo() {
>    jQuery(whatever).each( function() {
         return; // this just exits the anonymous function - is there a way to return from foo?
     }
   );
> 
> }

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery