Why does this not work?.........
SpiderView = Backbone.View.extend({
el: $('#mobidim'),
events: {
'click path': 'focusItem'
},
initialize: function(){
this.render();
},
render: function(){
$(this.el).html('<embed src="img/mobile-dimensions.svg" type="image/svg+xml" />');
},
focusItem: function(event ) {
console.log("yeeeeeeeeee");
}
});
var spider = new Spider;
var spiderView = new SpiderView();
-> Goal in the end is, that I can trigger events from items within the SVG graphic and then do some manipulation on the graphic (simple like hiding and showing nodes within the SVG)