git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed issue with $( obj, jQuery ) breaking the original jQuery object.
[jquery.git]
/
src
/
jquery
/
jquery.js
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
44c1eec
..
a373c5b
100644
(file)
--- 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
*/
// 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
// 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 )
// If the context is global, return a new object
if ( window == this )