I am trying to make the box appear when you click a node and then disappear if you click off of it. Right now it appears from the get go and it doesn't go away when you click off. Here is the JSFiddle
I tried to I am assuming the edit goes somewhere in here but I can't figure it out for the life of me. I've also checked the other related questions but they have different specific issues.
var node = svg.selectAll(".node")
.data(data.nodes)
.enter().append("g")
.attr("class", "node")
.on("mouseover", mouseover)
.on("mouseout", mouseout)
.on("click", function(d) {
text = "Generic Text Here: " + d.name;
d3.selectAll(".infobox")
//.append("rect")
//.attr("x", 70)
//.attr("y", 5)
//.attr("height", 100)
//.attr("width", 200)
//.select("text")
.select("a")
.attr("xlink:href", text)
.selectAll("text").text(text)})
.call(force.drag);
Thank you thank you