I am attempting to incorporate a link into my text utilizing D3. While constructing a list, I also want to provide the option to delete items from said list. Here is the snippet of code in question:
for (i in comparison) {
var t = d3.select("#comparison")
.select("ul")
.append("li")
.text('<a onClick="removeItemComparison(' + i + ')">[X]</a> | ' + comparison[i].properties.BCNAAM);
}
Unfortunately, instead of displaying a clickable hyperlink, the code gets inserted as a string.
I have attempted searching for solutions, but I am unsure which search terms to utilize. Your assistance would be greatly appreciated!