diff options
author | John Resig <jeresig@gmail.com> | 2007-07-25 00:56:50 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-07-25 00:56:50 +0000 |
commit | f8b00051c377360f0106e56c24df1353aaf6ad44 (patch) | |
tree | 1b354084626c86c4cc205be9b33d5bf2dace8f2f /src/jquery/jquery.js | |
parent | bdf05d890fe3a8cc085b2b4f13881ca043943e44 (diff) | |
download | jquery-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/jquery/jquery.js')
-rw-r--r-- | src/jquery/jquery.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 8a2c6b2c0..6f4bbe3fb 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1318,7 +1318,8 @@ jQuery.extend({ // check if an element is in a XML document isXMLDoc: function(elem) { - return elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; + return elem.documentElement && !elem.body || + elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; }, nodeName: function( elem, name ) { |