code: function ($node, relation) {
        var $target = {};
        var relation = relation || 'self';
        if (relation === 'parent') {
          $target = $node.closest('.nodes').siblings(':first');
          if ($target.length) {
            if ($target.is('.hidden') || (!$target.is('.hidden') && $target.closest('.nodes').is('.hidden'))) {
              return { 'exist': true, 'visible': false };
            }
            return { 'exist': true, 'visible': true };
          }
        } else if (relation === 'children') {
          $target = $node.closest('tr').siblings(':last');
          if ($target.length) {
            if (!$target.is('.hidden')) {
              return { 'exist': true, 'visible': true };
            }
            return { 'exist': true, 'visible': false };
          }
        } else if (relation === 'siblings') {
          $target = $node.closest('table').parent().siblings();
          if ($target.length) {
            if (!$target.is('.hidden') && !$target.parent().is('.hidden')) {
              return { 'exist': true, 'visible': true };
            }
            return { 'exist': true, 'visible': false };
          }
        } else {
          $target = $node;
          if ($target.length) {
            if (!(($target.closest('.nodes').length && $target.closest('.nodes').is('.hidden')) ||
              ($target.closest('table').parent().length && $target.closest('table').parent().is('.hidden')) ||
              ($target.parent().is('li') && ($target.closest('ul').is('.hidden') || $target.closest('verticalNodes').is('.hidden')))
            )) {
              return { 'exist': true, 'visible': true };
            }
            return { 'exist': true, 'visible': false };
          }
        }
        return { 'exist': false, 'visible': false };
      }
docs: detect the exist/display state of related node