From fde2867fce7b592096ae529ab5dcd0842e52f2ac Mon Sep 17 00:00:00 2001 From: John Resig Date: Sat, 24 Mar 2007 03:00:03 +0000 Subject: [PATCH] Added a fix for #891 (Using a /foo selector within a non-document context.) --- src/selector/selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selector/selector.js b/src/selector/selector.js index d59a555..856e0f5 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 ) -- 1.7.10.4