function contents() { var nodes = []; _util.each(this, function (element) { nodes.push.apply(nodes, _util.toArray(element.childNodes)); }); return _index.$(nodes); }
function parent(selector) { var nodes = []; _util.each(this, function (element) { if (!selector || selector && _index.matches(element.parentNode, selector)) { nodes.push(element.parentNode); } }); return _index.$(nodes); }
function siblings(selector) { var nodes = []; _util.each(this, function (element) { _util.each(element.parentNode.children, function (sibling) { if (sibling !== element && (!selector || selector && _index.matches(sibling, selector))) { nodes.push(sibling); } }); }); return _index.$(nodes); }
var _ret = (function () { var nodes = []; _util.each(_this, function (node) { var n = node.closest(selector); if (n) { nodes.push(n); } }); return { v: _index.$(_util.uniq(nodes)) }; })();
function children(selector) { var nodes = []; _util.each(this, function (element) { if (element.children) { _util.each(element.children, function (child) { if (!selector || selector && _index.matches(child, selector)) { nodes.push(child); } }); } }); return _index.$(nodes); }
function closest(selector, context) { var nodes = []; _util.each(this, function (node) { while (node && node !== context) { if (_index.matches(node, selector)) { nodes.push(node); break; } node = node.parentElement; } }); return _index.$(_util.uniq(nodes)); }
function slice(start, end) { return _index.$([].slice.apply(this, arguments)); }