Added fix for :nth-child(n).

This commit is contained in:
John Resig 2007-06-29 21:08:46 +00:00
parent 7b9d825890
commit 88c88f0704

View file

@ -377,7 +377,7 @@ jQuery.extend({
var add = false; var add = false;
if ( first == 1 ) { if ( first == 1 ) {
if ( node.nodeIndex == last ) if ( last == 0 || node.nodeIndex == last )
add = true; add = true;
} else if ( (node.nodeIndex + last) % first == 0 ) } else if ( (node.nodeIndex + last) % first == 0 )
add = true; add = true;