0

How to access element node data outside cy function? and here is my code :

function cytoFunc(myJson){
var cy = window.cy = cytoscape({
    container: document.getElementById('cy'),
       // style
       // elements
}); // end of cy

cy.$('node').qtip({
  content: 'I want to insert element data here',
  position: {
    my: 'left center',
    at: 'bottom center'
  },
  style: {
    classes: 'qtip-bootstrap',
    tip: {
      width: 16,
      height: 8
    }
  }
}); // end of cy.qtip

} // end of cytofunc

Dendi Handian
  • 348
  • 2
  • 12

1 Answers1

0

Call qtip on each element if you want per-element granularity. Use .forEach().

maxkfranz
  • 11,896
  • 1
  • 27
  • 36