X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=23b4a57dd14379174a912851c0b2219009bf62da;hb=d0750727684cb17a762ee338132159e389920799;hp=86c9982a0325a78956ab1a5d7985538cf40fbbd5;hpb=ffd457d4561eb1a6653aaef90f92a3b3010b9139;p=jquery.git diff --git a/src/core.js b/src/core.js index 86c9982..23b4a57 100644 --- a/src/core.js +++ b/src/core.js @@ -18,7 +18,7 @@ var window = this, jQuery = window.jQuery = window.$ = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' - return selector === undefined ? + return arguments.length === 0 ? rootjQuery : new jQuery.fn.init( selector, context ); }, @@ -36,12 +36,6 @@ var window = this, // Save a reference to the core toString method toString = Object.prototype.toString; -// Define the main jQuery method -jQuery = window.jQuery = window.$ = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); -}; - jQuery.fn = jQuery.prototype = { init: function( selector, context ) { var match, elem, ret;