Side navigation
Ticket #5172: patchContext.txt
File patchContext.txt, 0.6 KB (added by lrbabe, September 06, 2009 10:41PM UTC)
Index: core.js
===================================================================
--- core.js (revision 6533)
+++ core.js (working copy)
@@ -90,12 +90,13 @@
// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
+ if(context && context.length == 1) context.context = context[0];
return (context || rootjQuery).find( selector );
// HANDLE: $(expr, context)
// (which is just equivalent to: $(expr, $(context))
} else {
- return jQuery( context ).find( selector );
+ return jQuery( selector, jQuery( context ));
}
Download in other formats:
Original Format
File patchContext.txt, 0.6 KB (added by lrbabe, September 06, 2009 10:41PM UTC)
Index: core.js
===================================================================
--- core.js (revision 6533)
+++ core.js (working copy)
@@ -90,12 +90,13 @@
// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
+ if(context && context.length == 1) context.context = context[0];
return (context || rootjQuery).find( selector );
// HANDLE: $(expr, context)
// (which is just equivalent to: $(expr, $(context))
} else {
- return jQuery( context ).find( selector );
+ return jQuery( selector, jQuery( context ));
}