Commit 944484c3 authored by John Resig's avatar John Resig

Merged in from Sizzle - a change to child filter selector logic.

parent 95094d16
......@@ -513,9 +513,9 @@ var Expr = Sizzle.selectors = {
CHILD: function(elem, match){
var type = match[1], parent = elem.parentNode;
var doneName = match[0];
var doneName = "child" + parent.childNodes.length;
if ( parent && !parent[ doneName ] ) {
if ( parent && (!parent[ doneName ] || !elem.nodeIndex) ) {
var count = 1;
for ( var node = parent.firstChild; node; node = node.nextSibling ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment