On Nov 12, 1:24 pm, "John Resig" <[EMAIL PROTECTED]> wrote: > I'm curious - which cases of 'document' are you having trouble with > (which methods are having problems)? I think we'd like to try our hand > at fixing those bugs first before we consider more 'drastic' > solutions.
It's not a "bug" per se. jQuery makes the assumption that a global variable exists named 'document' and that it refers to the containing document element. This is not true in all cases where jQuery might be used - like in a FF add-on, for example. In the example posted, the code is passed a reference to the document object. Since jQuery assumes that 'document' is a global reference to the document, anywhere it is used will break. The solution is simple - instead of directly referencing 'document' in the jQuery code, create a jQuery variable that references the document. Any code not in the expected environment can change it as needed. Matt Kruse --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
