Referencing Cytoscape elements from external code

不羁的心 提交于 2019-12-23 04:19:07

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!