File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -96,13 +96,6 @@ jQuery.fn = jQuery.prototype = {
96
96
return this ;
97
97
}
98
98
99
- // HANDLE: $(DOMElement); check first that selector is not a primitive
100
- if ( typeof selector === "object" && selector . nodeType ) {
101
- this . context = this [ 0 ] = selector ;
102
- this . length = 1 ;
103
- return this ;
104
- }
105
-
106
99
// Handle HTML strings
107
100
if ( typeof selector === "string" ) {
108
101
if ( selector . charAt ( 0 ) === "<" && selector . charAt ( selector . length - 1 ) === ">" && selector . length >= 3 ) {
@@ -176,6 +169,12 @@ jQuery.fn = jQuery.prototype = {
176
169
return this . constructor ( context ) . find ( selector ) ;
177
170
}
178
171
172
+ // HANDLE: $(DOMElement)
173
+ } else if ( selector . nodeType ) {
174
+ this . context = this [ 0 ] = selector ;
175
+ this . length = 1 ;
176
+ return this ;
177
+
179
178
// HANDLE: $(function)
180
179
// Shortcut for document ready
181
180
} else if ( jQuery . isFunction ( selector ) ) {
You can’t perform that action at this time.
0 commit comments