| 3963 | |
| 3964 | // Returns a function to use in pseudos for positionals |
| 3965 | function createPositionalPseudo( fn ) { |
| 3966 | return markFunction(function( argument ) { |
| 3967 | argument = +argument; |
| 3968 | return markFunction(function( seed, matches ) { |
| 3969 | var j, |
| 3970 | matchIndexes = fn( [], seed.length, argument ), |
| 3971 | i = matchIndexes.length; |
| 3972 | |
| 3973 | // Match elements found at the specified indexes |
| 3974 | while ( i-- ) { |
| 3975 | if ( seed[ (j = matchIndexes[i]) ] ) { |
| 3976 | seed[j] = !(matches[j] = seed[j]); |
| 3977 | } |
| 3978 | } |
| 3979 | }); |
| 3980 | }); |
| 3981 | } |
| 3982 | |
| 3983 | /** |
| 3984 | * Utility function for retrieving the text value of an array of DOM nodes |