MCPcopy
hub / github.com/geekape/geek-navigation / createPositionalPseudo

Function createPositionalPseudo

js/jquery.js:1061–1077  ·  view source on GitHub ↗

* Returns a function to use in pseudos for positionals * @param {Function} fn

( fn )

Source from the content-addressed store, hash-verified

1059 * @param {Function} fn
1060 */
1061function createPositionalPseudo( fn ) {
1062 return markFunction(function( argument ) {
1063 argument = +argument;
1064 return markFunction(function( seed, matches ) {
1065 var j,
1066 matchIndexes = fn( [], seed.length, argument ),
1067 i = matchIndexes.length;
1068
1069 // Match elements found at the specified indexes
1070 while ( i-- ) {
1071 if ( seed[ (j = matchIndexes[i]) ] ) {
1072 seed[j] = !(matches[j] = seed[j]);
1073 }
1074 }
1075 });
1076 });
1077}
1078
1079/**
1080 * Checks a node for validity as a Sizzle context

Callers 1

jquery.jsFile · 0.85

Calls 1

markFunctionFunction · 0.85

Tested by

no test coverage detected