dist/js/jquery.orgchart.js
function ($node, relation) {
      if (!$node || !($node instanceof $) || !$node.is('.node')) {
        return $();
      }
      if (relation === 'parent') {
        return $node.closest('.nodes').parent().children(':first').find('.node');
      } else if (relation === 'children') {
        return $node.closest('tr').siblings('.nodes').children().find('.node:first');
      } else if (relation === 'siblings') {
        return $node.closest('table').parent().siblings().find('.node:first');
      } else {
        return $();
      }
    }
function ($node, relation) {
      if (!$node || !($node instanceof $) || !$node.is('.node')) {
        return $();
      }
      if (relation === 'parent') {
        return $node.closest('.nodes').parent().children(':first').find('.node');
      } else if (relation === 'children') {
        return $node.closest('tr').siblings('.nodes').children().find('.node:first');
      } else if (relation === 'siblings') {
        return $node.closest('table').parent().siblings().find('.node:first');
      } else {
        return $();
      }
    }
function ( $node , relation ) { if ( ! $node || ! ( $node instanceof $ ) || ! $node . is ( '.node' ) ) { return $ ( ) ; } if ( relation === 'parent' ) { return $node . closest ( '.nodes' ) . parent ( ) . children ( ':first' ) . find ( '.node' ) ; } else if ( relation === 'children' ) { return $node . closest ( 'tr' ) . siblings ( '.nodes' ) . children ( ) . find ( '.node:first' ) ; } else if ( relation === 'siblings' ) { return $node . closest ( 'table' ) . parent ( ) . siblings ( ) . find ( '.node:first' ) ; } else { return $ ( ) ; } }
find the related nodes
find the related nodes