title: How to use z-index in cytoscape.js?
body: <p>I'm using cytoscape.js. I have some nodes that are superposed and I’m trying to fix their z-index so I can bring to the front the nodes that are in the back. I don’t see to get it right. I did two examples:</p>
  
  <p>1) <a href="http://jsfiddle.net/VzCZm/2/" rel="nofollow">http://jsfiddle.net/VzCZm/2/</a> In these one I used the parent  attribute of the library, I fixed the z-index of the node “n2” to 10 and when you move the nodes  “n1” and “n2”  inside the node “father3”, you can see that these one is darker than “n1” but still it is behind the “father3” node. How can I bring it to the front?</p>
  
  <pre><code>ready: function(){
     window.cy = this; 
     cy.nodes("[id='n2']").css('z-index', 10);
  }
  </code></pre>
  
  <p>2) <a href="http://jsfiddle.net/6tKdD/" rel="nofollow">http://jsfiddle.net/6tKdD/</a> In these example I didn’t use the parent attribute because I thought that might be the problem, instead I used normal nodes and I superposed them manually. In this case you can manipulate the z-indexes and they work well, the only problem now is that the edges are drawn behind the nodes so you can’t see them, even if you change their z-index you still can’t see them. If you move either “George” or “Elaine” node outside “Jerry” node, you can see there’s an edge between those two nodes. How can make the edge visible?</p>
  
  <pre><code>ready: function(){
    window.cy = this;
    cy.nodes("[id='j']").css("z-index", 1);
    cy.nodes("[id='g']").css("z-index", 3);
    cy.nodes("[id='e']").css("z-index", 3);
    cy.edges("[source='g']").css("z-index", 2);
    cy.nodes("[id='k']").css("z-index", 0);
  }
  </code></pre>
  
  <p>Thank you very much for your help!</p>
  
  <p>Andreina</p>