aboutsummaryrefslogtreecommitdiffstats
path: root/src/selector
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-07-25 00:56:50 +0000
committerJohn Resig <jeresig@gmail.com>2007-07-25 00:56:50 +0000
commitf8b00051c377360f0106e56c24df1353aaf6ad44 (patch)
tree1b354084626c86c4cc205be9b33d5bf2dace8f2f /src/selector
parentbdf05d890fe3a8cc085b2b4f13881ca043943e44 (diff)
downloadjquery-f8b00051c377360f0106e56c24df1353aaf6ad44.tar.gz
jquery-f8b00051c377360f0106e56c24df1353aaf6ad44.zip
$("#foo", xml) would always return an empty set, fixed (bug #877). Additionally, a bug in jQuery.isXMLDoc(xmlDoc) was discovered, if the element was, in fact, an XML document.
Diffstat (limited to 'src/selector')
-rw-r--r--src/selector/selector.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/selector/selector.js b/src/selector/selector.js
index 2cf0b6404..366cf3188 100644
--- a/src/selector/selector.js
+++ b/src/selector/selector.js
@@ -213,7 +213,7 @@ jQuery.extend({
var elem = ret[ret.length-1];
// Try to do a global search by ID, where we can
- if ( m[1] == "#" && elem && elem.getElementById ) {
+ if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
// Optimization for HTML document case
var oid = elem.getElementById(m[2]);