MCPcopy
hub / github.com/layui/layui / dir

Function dir

src/modules/jquery.js:2812–2825  ·  view source on GitHub ↗
(elem, dir, until)

Source from the content-addressed store, hash-verified

2810 })();
2811
2812 var dir = function (elem, dir, until) {
2813 var matched = [],
2814 truncate = until !== undefined;
2815
2816 while ((elem = elem[dir]) && elem.nodeType !== 9) {
2817 if (elem.nodeType === 1) {
2818 if (truncate && jQuery(elem).is(until)) {
2819 break;
2820 }
2821 matched.push(elem);
2822 }
2823 }
2824 return matched;
2825 };
2826
2827 var siblings = function (n, elem) {
2828 var matched = [];

Callers 1

jquery.jsFile · 0.85

Calls 1

jQueryFunction · 0.85

Tested by

no test coverage detected