0

I am trying to match direct children of a parent node in cytoscape.js. I want to make the child nodes of a parent node visible on clicking on it. There is simple selector to do this as per the Cytoscape JS docs- Selector-Compound Nodes

This is what I am trying:

cy.$('node.master').click(function(){
   cy.$('node > this').css({visibility:'hidden',})
});

But I get the following in the console log - "The selector `node > this` is invalid ".

What is the right way to do it?

Pranjal Mittal
  • 10,772
  • 18
  • 74
  • 99

1 Answers1

1

this is not a valid token for selectors. Use node > node.

maxkfranz
  • 11,896
  • 1
  • 27
  • 36