问题
I'm trying to integrate qTip2 to show tooltips on mouse events for elements in a Cytoscape graph. I'm using this example. However, in my testing, the attempt to call qtip() on the selected element object fails, and IE for example says object doesn't support property or method qtip. I am sure the selector is working, since I can get at all of the element's properties.
What am I missing? Any insight is appreciated. Thanks!
Code:
cy.getElementById("n1").qtip({
content: {
text: 'My tooltip text'
}
});
回答1:
I found the issue, which is that there is a separate extension for qTip in this case, which I didn't see from looking at the JS Bin example. You can get the extension here.
来源:https://stackoverflow.com/questions/27851698/referencing-cytoscape-elements-from-external-code