diff options
author | John Resig <jeresig@gmail.com> | 2006-08-20 21:58:30 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2006-08-20 21:58:30 +0000 |
commit | 8ff329b0f346ea5282e76dc7fa7f91a79d6ff8eb (patch) | |
tree | 2eeb37e8ce0256bf3b709109f8bdb40253c49a85 /src | |
parent | 367abc373be76ae24b5aed2c5e49fbc308ecebcc (diff) | |
download | jquery-8ff329b0f346ea5282e76dc7fa7f91a79d6ff8eb.tar.gz jquery-8ff329b0f346ea5282e76dc7fa7f91a79d6ff8eb.zip |
Fixed issue with $( obj, jQuery ) breaking the original jQuery object.
Diffstat (limited to 'src')
-rw-r--r-- | src/jquery/jquery.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 44c1eec22..a373c5ba9 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -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 ) |