From: John Resig Date: Tue, 21 Aug 2007 07:00:06 +0000 (+0000) Subject: You can now assign jQuery to random namespaces - very cool. (Bug #1393) X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;ds=sidebyside;h=c8bd6e0a4aef14ad4808a63fc106849918ea4666;p=jquery.git You can now assign jQuery to random namespaces - very cool. (Bug #1393) --- diff --git a/src/intro.js b/src/intro.js index 2e64f66..9c2f985 100644 --- a/src/intro.js +++ b/src/intro.js @@ -1,2 +1,2 @@ // prevent execution of jQuery if included more than once -if(typeof window.jQuery == "undefined") (function(){ +if ( typeof jQuery == "undefined" ) (function(){ diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 8089e4e..9eb8377 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -19,7 +19,7 @@ * @param jQuery|Element|Array c context * @cat Core */ -window.jQuery = function(a,c) { +var jQuery = window.jQuery = function(a,c) { // If the context is global, return a new object if ( window == this || !this.init ) return new jQuery(a,c);