Hmmm... almost there, in my opinion, Andrea... I think it could be
used in the main jQuery object (singleton), also, to minimize browser
dependance, if the user wants to use it with normal Array objects...
like:

jQuery.forEach(myArrayObject, , myCallback, myContext);

What do you think? This way, the client code can use it both with
Array objects and jQuery wrapped DOM objects...

Diogo



On May 20, 3:35 am, Andrea Giammarchi <[email protected]>
wrote:
> JQuery.fn.forEach = Array.prototype.forEach || function(){ ... };  easy? :-)
>
> On May 20, 2009 3:07 AM, "diogobaeder" <[email protected]> wrote:
>
> Matt,
>
> I think your approach is usefull only if one wants to create a new
> jQuery method... because checking everytime if forEach method exists
> is not easily maintainable...
>
> Maybe it could be a $.forEach, applying the Mozilla implementation if
> the browser doesn't support the method... what do you guys think of
> it?
>
> Diogo
>
> On May 19, 11:29 am, Matt Kruse <[email protected]> wrote: > On May
> 19, 9:19 am, diogobaede...
--~--~---------~--~----~------------~-------~--~----~
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