d3.js On Events Remove event listener


Example

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:

d3.select('span').on('click', null)