diff options
Diffstat (limited to 'src/core.js')
-rw-r--r-- | src/core.js | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/core.js b/src/core.js index 3fcc9e46c..c9ed81d2a 100644 --- a/src/core.js +++ b/src/core.js @@ -1,7 +1,18 @@ -var jQuery = (function() { +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location, -// Define a local copy of jQuery -var jQuery = function( selector, context ) { + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); }, @@ -71,14 +82,6 @@ var jQuery = function( selector, context ) { jQuery.ready(); }, - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - // [[Class]] -> type pairs class2type = {}; @@ -933,7 +936,3 @@ function doScrollCheck() { // and execute any waiting functions jQuery.ready(); } - -return jQuery; - -})(); |