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

Function dir

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

Source from the content-addressed store, hash-verified

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

Callers 1

jQueryFactoryFunction · 0.70

Calls 1

jQueryFunction · 0.70

Tested by

no test coverage detected