diff options
author | John Resig <jeresig@gmail.com> | 2009-01-05 02:45:20 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-01-05 02:45:20 +0000 |
commit | 558d03f24ce63d05af53420dae2c80614cf81a3b (patch) | |
tree | e937badd31e4d17dd5b6521b0414bf42ef46c474 /src/selector.js | |
parent | 4694e537bc911d843524d5f54c65f29c8a60fc5c (diff) | |
download | jquery-558d03f24ce63d05af53420dae2c80614cf81a3b.tar.gz jquery-558d03f24ce63d05af53420dae2c80614cf81a3b.zip |
Merging from Sizzle (fixed a bug when querySelectorAll is used.
Diffstat (limited to 'src/selector.js')
-rw-r--r-- | src/selector.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/selector.js b/src/selector.js index 954011930..b3d8dbc9a 100644 --- a/src/selector.js +++ b/src/selector.js @@ -684,21 +684,22 @@ try { if ( document.querySelectorAll ) (function(){ var oldSizzle = Sizzle; - Sizzle = function(query, context, extra){ + Sizzle = function(query, context, extra, seed){ context = context || document; - if ( context.nodeType === 9 ) { + if ( !seed && context.nodeType === 9 ) { try { return makeArray( context.querySelectorAll(query) ); } catch(e){} } - return oldSizzle(query, context, extra); + return oldSizzle(query, context, extra, seed); }; Sizzle.find = oldSizzle.find; Sizzle.filter = oldSizzle.filter; Sizzle.selectors = oldSizzle.selectors; + Sizzle.matches = oldSizzle.matches; })(); if ( document.documentElement.getElementsByClassName ) { |