git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b9d825
)
Added fix for :nth-child(n).
author
John Resig
<jeresig@gmail.com>
Fri, 29 Jun 2007 21:08:46 +0000
(21:08 +0000)
committer
John Resig
<jeresig@gmail.com>
Fri, 29 Jun 2007 21:08:46 +0000
(21:08 +0000)
src/selector/selector.js
patch
|
blob
|
history
diff --git
a/src/selector/selector.js
b/src/selector/selector.js
index
e6d2d06
..
94af81e
100644
(file)
--- 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;