And how is it inferior to set the current item as an argument to the callback? This is how Array.prototype.forEach works. It causes less problems while providing the exact same functionality. Also, event handlers are not the same as functions used to iterate over an object, nor do they serve the same purpose, so one model doesn't necessarily apply to the other.
On Aug 11, 6:10 am, Scott González <scott.gonza...@gmail.com> wrote: > There definitely is a reason for it. jQuery is a library for working > with the DOM, it is not a library meant to fix every problem with > JavaScript or to try to extend JavaScript in every possible way. When > using jQuery specifically to work with the DOM (probably >90% of what > you're using it for, and 100% of what the average user uses it for), > it makes perfect sense to set the context to the current item. Also, > native event handlers set the context to the event target, so jQuery > had an existing model to follow. > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---