change edges line color when the connected node clicked in cytoscape.js
<p>could someone give an example of Cytoscape.js about a node that when it clicked, the neighbors edges changed its styles.</p>
<p>this code doesn't work:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>cy.$('node:selected').neighborhood('edge').style({
  'line-color': 'black'
});
cy.$('node:selected').connectedEdges().style({
  'line-color': 'black'
});</code></pre>
</div>
</div>
</p>