mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
jquery core: $() -> $(document) and $(undefined) -> $([]). Removed a duplicated block.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user