code: function (theparent) {
              if (this.parent() !== null)
                  this.detach();
              var children = theparent.children();
              children.push(this);
              theparent.children(children);
              this.parent(theparent);
          }
docs: /*  method: attach node to tree