jquery core: $() -> $(document) and $(undefined) -> $([]). Removed a duplicated block.
This commit is contained in:
parent
e45b41602f
commit
3a80de1c7a
2 changed files with 13 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue