dist/jquery.fancytree-all-deps.js
function(match, startNode, visibleOnly) {
			match =
				typeof match === "string"
					? _makeNodeTitleStartMatcher(match)
					: match;
			startNode = startNode || this.getFirstChild();

			var stopNode = null,
				parentChildren = startNode.parent.children,
				matchingNode = null,
				walkVisible = function(parent, idx, fn) {
					var i,
						grandParent,
						parentChildren = parent.children,
						siblingCount = parentChildren.length,
						node = parentChildren[idx];
					// visit node itself
					if (node && fn(node) === false) {
						return false;
					}
					// visit descendants
					if (node && node.children && node.expanded) {
						if (walkVisible(node, 0, fn) === false) {
							return false;
						}
					}
					// visit subsequent siblings
					for (i = idx + 1; i < siblingCount; i++) {
						if (walkVisible(parent, i, fn) === false) {
							return false;
						}
					}
					// visit parent's subsequent siblings
					grandParent = parent.parent;
					if (grandParent) {
						return walkVisible(
							grandParent,
							grandParent.children.indexOf(parent) + 1,
							fn
						);
					} else {
						// wrap-around: restart with first node
						return walkVisible(parent, 0, fn);
					}
				};

			walkVisible(
				startNode.parent,
				parentChildren.indexOf(startNode),
				function(node) {
					// Stop iteration if we see the start node a second time
					if (node === stopNode) {
						return false;
					}
					stopNode = stopNode || node;
					// Ignore nodes hidden by a filter
					if (!$(node.span).is(":visible")) {
						node.debug("quicksearch: skipping hidden node");
						return;
					}
					// Test if we found a match, but search for a second match if this
					// was the currently active node
					if (match(node)) {
						// node.debug("quicksearch match " + node.title, startNode);
						matchingNode = node;
						if (matchingNode !== startNode) {
							return false;
						}
					}
				}
			);
			return matchingNode;
		}
function(match, startNode, visibleOnly) {
			match =
				typeof match === "string"
					? _makeNodeTitleStartMatcher(match)
					: match;
			startNode = startNode || this.getFirstChild();

			var stopNode = null,
				parentChildren = startNode.parent.children,
				matchingNode = null,
				walkVisible = function(parent, idx, fn) {
					var i,
						grandParent,
						parentChildren = parent.children,
						siblingCount = parentChildren.length,
						node = parentChildren[idx];
					// visit node itself
					if (node && fn(node) === false) {
						return false;
					}
					// visit descendants
					if (node && node.children && node.expanded) {
						if (walkVisible(node, 0, fn) === false) {
							return false;
						}
					}
					// visit subsequent siblings
					for (i = idx + 1; i < siblingCount; i++) {
						if (walkVisible(parent, i, fn) === false) {
							return false;
						}
					}
					// visit parent's subsequent siblings
					grandParent = parent.parent;
					if (grandParent) {
						return walkVisible(
							grandParent,
							grandParent.children.indexOf(parent) + 1,
							fn
						);
					} else {
						// wrap-around: restart with first node
						return walkVisible(parent, 0, fn);
					}
				};

			walkVisible(
				startNode.parent,
				parentChildren.indexOf(startNode),
				function(node) {
					// Stop iteration if we see the start node a second time
					if (node === stopNode) {
						return false;
					}
					stopNode = stopNode || node;
					// Ignore nodes hidden by a filter
					if (!$(node.span).is(":visible")) {
						node.debug("quicksearch: skipping hidden node");
						return;
					}
					// Test if we found a match, but search for a second match if this
					// was the currently active node
					if (match(node)) {
						// node.debug("quicksearch match " + node.title, startNode);
						matchingNode = node;
						if (matchingNode !== startNode) {
							return false;
						}
					}
				}
			);
			return matchingNode;
		}
function ( match , startNode , visibleOnly ) { match = typeof match === "string" ? _makeNodeTitleStartMatcher ( match ) : match ; startNode = startNode || this . getFirstChild ( ) ; var stopNode = null , parentChildren = startNode . parent . children , matchingNode = null , walkVisible = function ( parent , idx , fn ) { var i , grandParent , parentChildren = parent . children , siblingCount = parentChildren . length , node = parentChildren [ idx ] ; // visit node itself if ( node && fn ( node ) === false ) { return false ; } // visit descendants if ( node && node . children && node . expanded ) { if ( walkVisible ( node , 0 , fn ) === false ) { return false ; } } // visit subsequent siblings for ( i = idx + 1 ; i < siblingCount ; i ++ ) { if ( walkVisible ( parent , i , fn ) === false ) { return false ; } } // visit parent's subsequent siblings grandParent = parent . parent ; if ( grandParent ) { return walkVisible ( grandParent , grandParent . children . indexOf ( parent ) + 1 , fn ) ; } else { // wrap-around: restart with first node return walkVisible ( parent , 0 , fn ) ; } } ; walkVisible ( startNode . parent , parentChildren . indexOf ( startNode ) , function ( node ) { // Stop iteration if we see the start node a second time if ( node === stopNode ) { return false ; } stopNode = stopNode || node ; // Ignore nodes hidden by a filter if ( ! $ ( node . span ) . is ( ":visible" ) ) { node . debug ( "quicksearch: skipping hidden node" ) ; return ; } // Test if we found a match, but search for a second match if this // was the currently active node if ( match ( node ) ) { // node.debug("quicksearch match " + node.title, startNode); matchingNode = node ; if ( matchingNode !== startNode ) { return false ; } } } ) ; return matchingNode ; }
Find the next visible node that starts with `match`, starting at `startNode`
and wrap-around at the end.

@param {string|function} match
@param {FancytreeNode} [startNode] defaults to first node
@returns {FancytreeNode} matching node or null
Find the next visible node that starts with match starting at startNode and wrap - around at the end .