dist/jquery.fancytree-all-deps.js
function(el) {
				var widget;

				if (el instanceof Fancytree) {
					return el; // el already was a Fancytree
				}
				if (el === undefined) {
					el = 0; // get first tree
				}
				if (typeof el === "number") {
					el = $(".fancytree-container").eq(el); // el was an integer: return nth instance
				} else if (typeof el === "string") {
					el = $(el).eq(0); // el was a selector: use first match
				} else if (el instanceof $) {
					el = el.eq(0); // el was a jQuery object: use the first DOM element
				} else if (el.originalEvent !== undefined) {
					el = $(el.target); // el was an Event
				}
				el = el.closest(":ui-fancytree");
				widget = el.data("ui-fancytree") || el.data("fancytree"); // the latter is required by jQuery <= 1.8
				return widget ? widget.tree : null;
			}
function(el) {
				var widget;

				if (el instanceof Fancytree) {
					return el; // el already was a Fancytree
				}
				if (el === undefined) {
					el = 0; // get first tree
				}
				if (typeof el === "number") {
					el = $(".fancytree-container").eq(el); // el was an integer: return nth instance
				} else if (typeof el === "string") {
					el = $(el).eq(0); // el was a selector: use first match
				} else if (el instanceof $) {
					el = el.eq(0); // el was a jQuery object: use the first DOM element
				} else if (el.originalEvent !== undefined) {
					el = $(el.target); // el was an Event
				}
				el = el.closest(":ui-fancytree");
				widget = el.data("ui-fancytree") || el.data("fancytree"); // the latter is required by jQuery <= 1.8
				return widget ? widget.tree : null;
			}
function ( el ) { var widget ; if ( el instanceof Fancytree ) { return el ; // el already was a Fancytree } if ( el === undefined ) { el = 0 ; // get first tree } if ( typeof el === "number" ) { el = $ ( ".fancytree-container" ) . eq ( el ) ; // el was an integer: return nth instance } else if ( typeof el === "string" ) { el = $ ( el ) . eq ( 0 ) ; // el was a selector: use first match } else if ( el instanceof $ ) { el = el . eq ( 0 ) ; // el was a jQuery object: use the first DOM element } else if ( el . originalEvent !== undefined ) { el = $ ( el . target ) ; // el was an Event } el = el . closest ( ":ui-fancytree" ) ; widget = el . data ( "ui-fancytree" ) || el . data ( "fancytree" ) ; // the latter is required by jQuery <= 1.8 return widget ? widget . tree : null ; }
Return a Fancytree instance, from element, index, event, or jQueryObject.

@param {Element | jQueryObject | Event | integer | string} [el]
@returns {Fancytree} matching tree or null
@example
$.ui.fancytree.getTree();   // Get first Fancytree instance on page
$.ui.fancytree.getTree(1);  // Get second Fancytree instance on page
$.ui.fancytree.getTree("#tree"); // Get tree for this matching element

@since 2.13
Return a Fancytree instance from element index event or jQueryObject .