Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issue with $( obj, jQuery ) breaking the original jQuery object.

  • Loading branch information...
commit 8ff329b0f346ea5282e76dc7fa7f91a79d6ff8eb 1 parent 367abc3
@jeresig jeresig authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/jquery/jquery.js
View
6 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 )
Please sign in to comment.
Something went wrong with that request. Please try again.