title: Getting list of edges in cytoscape.js when clicking on a node
body: <p>I'm trying to create a cytoscape.js graph in which clicking on a node will change the color of any edges connecting to the node. I've been able to locate individual components but am not able to get them to work together. I'm new to JavaScript as well as cytoscape.js so make no assumptions in your answer. </p>
  
  <p>From the examples, a mouse-click event can be registered and in this case prints the ID of a node onto the console. </p>
  
  <pre><code>cy.on('tap', 'node', function(evt){
    var node = evt.cyTarget;
    console.log(  node.id() );
  });
  </code></pre>
  
  <p>Edges connected to a specific node can be found in this fashion if their plain-text ID is known:</p>
  
  <pre><code>cy.edges("[source = 'NodeTextId']")
  </code></pre>
  
  <p>Finally, the color of an edge can be updated with:</p>
  
  <pre><code>someEdge.animate({
      css: {
          'line-color': 'red'
      }
  })
  </code></pre>
  
  <p>How can I use the <code>cy.on()</code> mouse click event to return a value which can be used with <code>cy.edges()</code> to get an array of edges which can be iterated to change the colors of the edges? </p>
  
  <p>Thanks so much!</p>