From 88c88f0704e70299cd3101a40b29cb37b79276d0 Mon Sep 17 00:00:00 2001 From: John Resig Date: Fri, 29 Jun 2007 21:08:46 +0000 Subject: [PATCH] Added fix for :nth-child(n). --- 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 e6d2d069..94af81e8 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -377,7 +377,7 @@ jQuery.extend({ var add = false; if ( first == 1 ) { - if ( node.nodeIndex == last ) + if ( last == 0 || node.nodeIndex == last ) add = true; } else if ( (node.nodeIndex + last) % first == 0 ) add = true;