diff options
Diffstat (limited to 'libs/bower_components/jquery/src/traversing/var')
3 files changed, 37 insertions, 2 deletions
diff --git a/libs/bower_components/jquery/src/traversing/var/dir.js b/libs/bower_components/jquery/src/traversing/var/dir.js new file mode 100644 index 0000000000..b98fdca0e9 --- /dev/null +++ b/libs/bower_components/jquery/src/traversing/var/dir.js @@ -0,0 +1,20 @@ +define( [ + "../../core" +], function( jQuery ) { + +return function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + +} ); diff --git a/libs/bower_components/jquery/src/traversing/var/rneedsContext.js b/libs/bower_components/jquery/src/traversing/var/rneedsContext.js index 3d6ae40380..f57fd9de2f 100644 --- a/libs/bower_components/jquery/src/traversing/var/rneedsContext.js +++ b/libs/bower_components/jquery/src/traversing/var/rneedsContext.js @@ -1,6 +1,6 @@ -define([ +define( [ "../../core", "../../selector" ], function( jQuery ) { return jQuery.expr.match.needsContext; -}); +} ); diff --git a/libs/bower_components/jquery/src/traversing/var/siblings.js b/libs/bower_components/jquery/src/traversing/var/siblings.js new file mode 100644 index 0000000000..8a8880bf74 --- /dev/null +++ b/libs/bower_components/jquery/src/traversing/var/siblings.js @@ -0,0 +1,15 @@ +define( function() { + +return function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + +} ); |