aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-03-24 03:00:03 +0000
committerJohn Resig <jeresig@gmail.com>2007-03-24 03:00:03 +0000
commitfde2867fce7b592096ae529ab5dcd0842e52f2ac (patch)
tree0c1583a7f801775f0b8b5641a78fb0afaacbf703
parent32b523b5c5f3e2bf40abba2ccf5c7a463ba24b07 (diff)
downloadjquery-fde2867fce7b592096ae529ab5dcd0842e52f2ac.tar.gz
jquery-fde2867fce7b592096ae529ab5dcd0842e52f2ac.zip
Added a fix for #891 (Using a /foo selector within a non-document context.)
-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 d59a555ac..856e0f594 100644
--- a/src/selector/selector.js
+++ b/src/selector/selector.js
@@ -126,7 +126,7 @@ jQuery.extend({
t = t.substr(2,t.length);
// And the / root expression
- } else if ( !t.indexOf("/") ) {
+ } else if ( !t.indexOf("/") && !context.ownerDocument ) {
context = context.documentElement;
t = t.substr(1,t.length);
if ( t.indexOf("/") >= 1 )