Commit 8ff329b0 authored by John Resig's avatar John Resig

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

parent 367abc37
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment