From: John Resig Date: Fri, 29 Jun 2007 21:08:46 +0000 (+0000) Subject: Added fix for :nth-child(n). X-Git-Tag: 1.1.3~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=88c88f0704e70299cd3101a40b29cb37b79276d0;p=jquery.git Added fix for :nth-child(n). --- diff --git a/src/selector/selector.js b/src/selector/selector.js index e6d2d0697..94af81e83 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;