CHILD positions were being cached improperly. Tweaked it and added a test to make sure it doesn't happen again. Fixes jQuery bug #3924.

This commit is contained in:
John Resig 2009-01-21 22:01:50 +00:00
parent 00b70c7527
commit 626961c4a5
2 changed files with 10 additions and 2 deletions

View file

@ -495,7 +495,7 @@ var Expr = Sizzle.selectors = {
CHILD: function(elem, match){
var type = match[1], parent = elem.parentNode;
var doneName = "child" + parent.childNodes.length;
var doneName = match[0];
if ( parent && (!parent[ doneName ] || !elem.nodeIndex) ) {
var count = 1;