example/js/svg.js
function(d) {
      // create textPath element
      var path  = new SVG.TextPath
        , track = this.doc().defs().path(d)

      // move lines to textpath
      while (this.node.hasChildNodes())
        path.node.appendChild(this.node.firstChild)

      // add textPath element as child node
      this.node.appendChild(path.node)

      // link textPath to path and add content
      path.attr('href', '#' + track, SVG.xlink)

      return this
    }
function(d) {
      // create textPath element
      var path  = new SVG.TextPath
        , track = this.doc().defs().path(d)

      // move lines to textpath
      while (this.node.hasChildNodes())
        path.node.appendChild(this.node.firstChild)

      // add textPath element as child node
      this.node.appendChild(path.node)

      // link textPath to path and add content
      path.attr('href', '#' + track, SVG.xlink)

      return this
    }
function ( d ) { // create textPath element var path = new SVG . TextPath , track = this . doc ( ) . defs ( ) . path ( d ) // move lines to textpath while ( this . node . hasChildNodes ( ) ) path . node . appendChild ( this . node . firstChild ) // add textPath element as child node this . node . appendChild ( path . node ) // link textPath to path and add content path . attr ( 'href' , '#' + track , SVG . xlink ) return this }
Create path for text to run on
Create path for text to run on