Calling jQuery() with apply would break things (namely in the SlickSpeed test suite).
authorJohn Resig <jeresig@gmail.com>
Fri, 29 Jun 2007 20:52:59 +0000 (20:52 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 29 Jun 2007 20:52:59 +0000 (20:52 +0000)
src/jquery/jquery.js

index fe8b32b..e5e494a 100644 (file)
@@ -24,7 +24,7 @@ window.undefined = window.undefined;
  */
 var jQuery = function(a,c) {
        // If the context is global, return a new object
-       if ( window == this )
+       if ( window == this || !this.init )
                return new jQuery(a,c);
        
        return this.init(a,c);