score:0

Accepted answer

Instead of doing

div.html("data")
                                .style("left", (window.event.pageX) + "px")
                                .style("top", (window.event.pageY - 28) + "px");

try

div.html("data")
                                .style("left", (d3.event.pageX) + "px")
                                .style("top", (d3.event.pageY - 28) + "px");

Related Query

More Query from same tag