I have tried to add some popup messages next to nodes but it looks like anything other than SVG
This works:
Alternatively, you can define your html code outside of svg in its' own div. Then append the contents by class using:
d3.select("#nytg-tooltip").style('top',ypos+"px").style('left',xpos+"px").style('display','block');
As seen in this example:
http://www.nytimes.com/interactive/2012/10/15/us/politics/swing-history.html?_r=0
