( fn )
| 4485 | |
| 4486 | // Returns a function to use in pseudos for positionals |
| 4487 | function createPositionalPseudo( fn ) { |
| 4488 | return markFunction(function( argument ) { |
| 4489 | argument = +argument; |
| 4490 | return markFunction(function( seed, matches ) { |
| 4491 | var j, |
| 4492 | matchIndexes = fn( [], seed.length, argument ), |
| 4493 | i = matchIndexes.length; |
| 4494 | |
| 4495 | // Match elements found at the specified indexes |
| 4496 | while ( i-- ) { |
| 4497 | if ( seed[ (j = matchIndexes[i]) ] ) { |
| 4498 | seed[j] = !(matches[j] = seed[j]); |
| 4499 | } |
| 4500 | } |
| 4501 | }); |
| 4502 | }); |
| 4503 | } |
| 4504 | |
| 4505 | /** |
| 4506 | * Utility function for retrieving the text value of an array of DOM nodes |
no test coverage detected