]> source.dussan.org Git - jquery.git/commitdiff
Added fix for :nth-child(n).
authorJohn Resig <jeresig@gmail.com>
Fri, 29 Jun 2007 21:08:46 +0000 (21:08 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 29 Jun 2007 21:08:46 +0000 (21:08 +0000)
src/selector/selector.js

index e6d2d0697708677c271921601e6db3aa13fc7bdb..94af81e8358a746d5a169627eae57f4ab2e442ba 100644 (file)
@@ -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;