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

hp36 picture hp36 · Jan 8, 2014 · Viewed 12.6k times · Source

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 this? Is there some other way to show tooltip on nodes?

Thanks in advance.

Answer

Jackel Tex picture Jackel Tex · Sep 25, 2015

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.