MCPcopy
hub / github.com/jquery-backstretch/jquery-backstretch / createPositionalPseudo

Function createPositionalPseudo

libs/jquery/jquery.js:3965–3981  ·  view source on GitHub ↗
( fn )

Source from the content-addressed store, hash-verified

3963
3964// Returns a function to use in pseudos for positionals
3965function 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

Callers 1

jquery.jsFile · 0.85

Calls 1

markFunctionFunction · 0.85

Tested by

no test coverage detected