Having trouble delegating events for elements that might not yet exist. E.g. the below code does not work, unless I bind the 'mouseenter' handler after the graph has already been created.
var GraphView = Backbone.D3View.extend({
tagName: 'svg',
initialize: function(){
this.delegate('mouseenter', '.node', function(e){
console.log(e);
});
this.buildGraph();
}
};
Or am I misunderstanding the point of event delegation, and/or implementing it incorrectly?