d3.js doesn't have a .off() method to detatch existent event listeners. In order to remove an event handler, you have to set it to null:
.off()
null
d3.select('span').on('click', null)