code: function(ctx, flag, opts) {
  		var dfd = new $.Deferred(),
  			subOpts = $.extend({}, opts, {noEvents: true, noAnimation: true});
  
  		opts = opts || {};
  
  		function _afterExpand(ok) {
  			flag = (flag !== false);
  			setChildRowVisibility(ctx.node, flag);
  			if( ok ) {
  				if( flag && ctx.options.autoScroll && !opts.noAnimation && ctx.node.hasChildren() ) {
  					// Scroll down to last child, but keep current node visible
  					ctx.node.getLastChild().scrollIntoView(true, {topNode: ctx.node}).always(function(){
  						if( !opts.noEvents ) {
  							ctx.tree._triggerNodeEvent(flag ? "expand" : "collapse", ctx);
  						}
  						dfd.resolveWith(ctx.node);
  					});
  				} else {
  					if( !opts.noEvents ) {
  						ctx.tree._triggerNodeEvent(flag ? "expand" : "collapse", ctx);
  					}
  					dfd.resolveWith(ctx.node);
  				}
  			} else {
  				if( !opts.noEvents ) {
  					ctx.tree._triggerNodeEvent(flag ? "expand" : "collapse", ctx);
  				}
  				dfd.rejectWith(ctx.node);
  			}
  		}
  		// Call base-expand with disabled  events and animation
  		this._super(ctx, flag, subOpts).done(function () {
  			_afterExpand(true);
  		}).fail(function () {
  			_afterExpand(false);
  		});
  		return dfd.promise();
  	}
docs: /* Expand node, return Deferred.promise.