In cytoscapeweb it was possible to configure a context-menu for e.g. nodes (addContextMenuItem). How can I achieve the same with cytoscape.js? I would like to bind a menu for each node. It seems that I have a problem to select the node and then consequently attach a jquery-menu to it. I tried to use the jqueryui menu-widget:
cy.on('cxttapstart ', 'node', function(e){
var ci=e.cyTarget.data();
cy.elements("node[id='"+ci.id+"']").menu({ position: { my: "right top", at: "left-5 top+5"} });
});
I get a TypeError: cy.elements(...).menu is not a function
Can somebody point me in the right direction, please? :-) Thank you!