Display popup showing node statistics in cytoscape.js
<p>Started exploring cytoscape.js  since last one week. Its simply amazing. I am using cytoscape.js for one of my usecases wherein i need to show a graph of flight network. Here, I would like to show a small pop-up on clicking an airport (node) that contains few statistics such as degree, pagerank etc. Any pointer will help. For your reference, here is the code I wrote. I could see the graph exactly how I wanted. But what I am missing is the piece of code that can display a pop up on clicking the nodes.  Thanks in advance for your help</p>

<pre><code>&lt;script&gt;
var cy1 = cytoscape({
container: document.getElementById('cy1'),
 layout: {
 name: 'concentric',
 concentric: function( node ){
          return node.degree();
        },
        levelWidth: function( nodes ){
          return 15;
        }

  },

  style: [ // the stylesheet for the graph
  { 
  selector: 'node',
  style: {
    'background-color': '#666',
    'label': 'data(id)'
  }
  },

  {
  selector: 'edge',
  style: {
    'width': 1,
    'line-color': '#ccc',
    'target-arrow-color': '#ccc',
    'target-arrow-shape': 'triangle'
  }
 }
 ],
 elements: {
    nodes: airportsJSON,
    edges: edgeJSON
 }
});

var pr = cy1.elements().pageRank();
console.log("Statistics*****");
for(i = 0; i&lt;cy1.nodes().length; i++)
{ 
console.log(cy1.nodes()[i].data('id') + "-&gt;"+cy1.nodes()[i].indegree(true) + " "+cy1.nodes()[i].outdegree(true) + " "+cy1.nodes()[i].totalDegree(true));
}

console.log("done");
&lt;/script&gt;
</code></pre>