How to add tooltip on mouseover event on nodes in graph with cytoscape.js

后端 未结 2 1353
失恋的感觉
失恋的感觉 2020-12-11 06:04

I want to show node\'s details on mouseover event on all nodes in graph created with cytoscape.js. I have found a plug-in qtip, but this is not working. How can i achieve t

2条回答
  •  不知归路
    2020-12-11 06:50

    This would be help you.

    cy.on('mouseover', 'node', function(event) {
        var node = event.cyTarget;
        node.qtip({
             content: 'hello',
             show: {
                event: event.type,
                ready: true
             },
             hide: {
                event: 'mouseout unfocus'
             }
        }, event);
    });
    

    but it still remains show (not hide) sometime when there are many nodes.

提交回复
热议问题