I think you guys are missing the point. This isn't a question about object-oriented programming (in JavaScript or otherwise). It's about jQuery's handling of "this" within the context of "each".
To answer the original question, I don't think there's any real reason for it. It was an unfortunate blunder (probably intended for convenience) that will probably remain (for backwards compatibility). As said, you can store the reference to "this" in a variable, so you can work around it. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---