Changeset 6209
- Timestamp:
- 02/22/07 21:13:35 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/branches/selector/src/selector.js
r6208 r6209 137 137 } 138 138 } 139 return "[not(" + m[ 4] + ")]";139 return "[not(" + m[6] + ")]"; 140 140 }, 141 141 'nth-child': function(m) { 142 return Selector.xpath.pseudos.nth(" count(./preceding-sibling::*) + 1", m);142 return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m); 143 143 }, 144 144 'nth-last-child': function(m) { 145 return Selector.xpath.pseudos.nth(" count(./following-sibling::*) + 1", m);145 return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m); 146 146 }, 147 147 'nth-of-type': function(m) { … … 484 484 var h = Selector.handlers, 485 485 matches = new Selector(selector).findElements(root); 486 h.mark(matches); 486 h.mark(matches); 487 487 for (var i = 0, results = [], node; node = nodes[i]; i++) 488 488 if (!node._counted) results.push(node);