jquery core: $() -> $(document) and $(undefined) -> $([]). Removed a duplicated block.

This commit is contained in:
Ariel Flesler 2009-05-03 15:57:25 +00:00
parent e45b41602f
commit 3a80de1c7a
2 changed files with 13 additions and 13 deletions

View file

@ -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;