MCPcopy Index your code
hub / github.com/jquery/jquery / dir

Function dir

dist-module/jquery.factory.module.js:2459–2472  ·  view source on GitHub ↗
( elem, dir, until )

Source from the content-addressed store, hash-verified

2457find.tokenize = tokenize;
2458
2459function dir( elem, dir, until ) {
2460 var matched = [],
2461 truncate = until !== undefined;
2462
2463 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
2464 if ( elem.nodeType === 1 ) {
2465 if ( truncate && jQuery( elem ).is( until ) ) {
2466 break;
2467 }
2468 matched.push( elem );
2469 }
2470 }
2471 return matched;
2472}
2473
2474function siblings( n, elem ) {
2475 var matched = [];

Callers 1

jQueryFactoryWrapperFunction · 0.70

Calls 1

jQueryFunction · 0.70

Tested by

no test coverage detected