http://dev.jquery.com/ticket/3877

The response ths ticket got isn't what I would have expected it to get
based on the reactions in this thread?  Wha happen?

--adam

On Dec 18 2008, 8:11 pm, oliver <[email protected]> wrote:
> I suppose this is only changing thereturnvalue of $.each, not $
> ([elem]).each(), correct?  It does seem useful to have access to that,
> but can't this line above:
>      $.each(col, cb);
> be re-written in a nested function in such a way as to get the access
> to thereturnvalue?
>      $.each(col, function(i, n) { var result = cb.call(this); });
>
> oliver
>
> On Dec 18, 6:03 am, "Ariel Flesler" <[email protected]> wrote:
>
> > Ah... sort of an (inverted) detect/any function....
>
> > Ok, why not :)
>
> > On Thu, Dec 18, 2008 at 11:58 AM, John Resig <[email protected]> wrote:
>
> > >> Isn't that what $.map does ?
>
> > > Not really. He wants it so that you can do:
>
> > > var ret = $.each(array, function(){
> > >  if ( this == someValue )
> > >    returnfalse;
> > > });
>
> > > if ( ret == false ) {
> > >  // do something
> > > }
>
> > > thereturnvalue will only equal false if areturnfalse was done to
> > > break the loop.
>
> > > --John
>
> > --
> > Ariel Fleslerhttp://flesler.blogspot.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to