I want to use qtip together with cytoscape.js to dispaly tooltips in nodes on mouseover event in graph created with cytoscape.js. I have placed following code inside ready: function() as shown below:
cy.on('mouseover','node',function (event) {
var eid = $(this).data('id');
$(this).qtip({
overwrite: false,
content: eid,
position: {
my: 'right center',
at: 'left center',
target: $(this)
},
show: {
event: event.type,
ready: true
},
hide: {
fixed: true
}
}, event);
});
But, there is no tooltip displaying in node on mouseover event.. Please help me.
Provide the correct coordinate to qtip to interact with node hovering. It can be done with cyPosition Hope this helps:
also you are not specifying event target. And don't forget to use mousemove while dealing with canvas.