Skip to content

Commit

Permalink
Fixed issue with $( obj, jQuery ) breaking the original jQuery object.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Aug 20, 2006
1 parent 367abc3 commit 8ff329b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/jquery/jquery.js
Expand Up @@ -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 )
Expand Down

0 comments on commit 8ff329b

Please sign in to comment.