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?