Making mobile application with phonejs, I'm using d3.js with force layout. I want to add some functionality when node of d3 is double-tapped or held-with-tap. But double-click event does not do anything in phone. I also tried jQuery touch events but didn't work here. How can I put touch event on node of d3?
Here is the node:
node = container.append("g").selectAll("image.node")
.data(nodes_edges_json.nodes)
.enter().appent("g").append("svg:image")
.attr("class", "node")
.attr("xlink:href", function(nodeObj) { return setImage(nodeObj); })
.attr("width", function(nodeObj) { return setHeightWidth(nodeObj); })
.attr("height", function(nodeObj) { return setHeightWidth(nodeObj); })
.on("dblclick", function(data, index) {
d3.event.preventDefault();
getdata(data, index);
});