X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fselector%2Fselector.js;h=366cf31883016498e6dd379d146cd7d97239e25f;hb=f8b00051c377360f0106e56c24df1353aaf6ad44;hp=b574fa903e8a7669b5813a6679f4867209bc35e8;hpb=97a6bdbaba302015e84c54a5024dd7faadf35581;p=jquery.git diff --git a/src/selector/selector.js b/src/selector/selector.js index b574fa9..366cf31 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -99,7 +99,7 @@ jQuery.extend({ // Handle the common XPath // expression if ( !t.indexOf("//") ) { - context = context.documentElement; + //context = context.documentElement; t = t.substr(2,t.length); // And the / root expression @@ -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]);