Optimize jQuery() for the case $("TAG").
This commit is contained in:
parent
1e750a00e9
commit
4ea4fad090
|
@ -109,6 +109,10 @@ jQuery.fn = jQuery.prototype = {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HANDLE: $("TAG")
|
||||||
|
} else if ( !context && /^\w+$/.test( selector ) ) {
|
||||||
|
selector = document.getElementsByTagName( selector );
|
||||||
|
|
||||||
// HANDLE: $(expr, $(...))
|
// HANDLE: $(expr, $(...))
|
||||||
} else if ( !context || context.jquery ) {
|
} else if ( !context || context.jquery ) {
|
||||||
return (context || rootjQuery).find( selector );
|
return (context || rootjQuery).find( selector );
|
||||||
|
|
Loading…
Reference in a new issue