Skip to content
Permalink
Browse files

As it turns out, the context was being started at a higher root than …

…needed - fixing this speeds up > selectors.
  • Loading branch information...
jeresig committed Feb 26, 2009
1 parent 58235cc commit 410e13b40097fa6b26ce9a27f865ff258efa23b4
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/selector.js
@@ -68,7 +68,7 @@ var Sizzle = function(selector, context, results, seed) {
if ( context ) {
var ret = seed ?
{ expr: parts.pop(), set: makeArray(seed) } :
Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, contextXML );
Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;

if ( parts.length > 0 ) {

0 comments on commit 410e13b

Please sign in to comment.
You can’t perform that action at this time.