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 a bug with $("body") in dynamic documents, refactored $(...), stopped the test...
[jquery.git]
/
src
/
selector
/
selector.js
diff --git
a/src/selector/selector.js
b/src/selector/selector.js
index
4633c30
..
d9114c2
100644
(file)
--- a/
src/selector/selector.js
+++ b/
src/selector/selector.js
@@
-59,7
+59,7
@@
jQuery.extend({
_resort: function(m){
return ["", m[1], m[3], m[2], m[5]];
},
_resort: function(m){
return ["", m[1], m[3], m[2], m[5]];
},
- _prefix: "z=jQuery.attr(a,m[3]);"
+ _prefix: "z=a[m[3]]||jQuery.attr(a,m[3]);"
},
"[": "jQuery.find(m[2],a).length"
},
},
"[": "jQuery.find(m[2],a).length"
},
@@
-101,7
+101,7
@@
jQuery.extend({
return [ t ];
// Make sure that the context is a DOM Element
return [ t ];
// Make sure that the context is a DOM Element
- if ( context && context.nodeType == undefined )
+ if ( context && !context.nodeType )
context = null;
// Set the correct context (if none is provided)
context = null;
// Set the correct context (if none is provided)
@@
-214,10
+214,6
@@
jQuery.extend({
ret = r = oid &&
(!m[3] || oid.nodeName == m[3].toUpperCase()) ? [oid] : [];
ret = r = oid &&
(!m[3] || oid.nodeName == m[3].toUpperCase()) ? [oid] : [];
- // Use the DOM 0 shortcut for the body element
- } else if ( m[1] == "" && m[2] == "body" ) {
- ret = r = [ document.body ];
-
} else {
// Pre-compile a regular expression to handle class searches
if ( m[1] == "." )
} else {
// Pre-compile a regular expression to handle class searches
if ( m[1] == "." )
@@
-423,4
+419,4
@@
jQuery.extend({
return r;
}
return r;
}
-});
\ No newline at end of file
+});