mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fixed issue with $( obj, jQuery ) breaking the original jQuery object.
This commit is contained in:
parent
367abc373b
commit
8ff329b0f3
6
src/jquery/jquery.js
vendored
6
src/jquery/jquery.js
vendored
@ -59,10 +59,12 @@ function jQuery(a,c) {
|
||||
*/
|
||||
|
||||
// Watch for when a jQuery object is passed as the selector
|
||||
if ( a.jquery ) return a;
|
||||
if ( a.jquery )
|
||||
return $( jQuery.merge( a, [] ) );
|
||||
|
||||
// Watch for when a jQuery object is passed at the context
|
||||
if ( c && c.jquery ) return c.find(a);
|
||||
if ( c && c.jquery )
|
||||
return $( c ).find(a);
|
||||
|
||||
// If the context is global, return a new object
|
||||
if ( window == this )
|
||||
|
Loading…
Reference in New Issue
Block a user