Skip to content

Commit

Permalink
have villain view respond to click event
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsulc committed Oct 22, 2013
1 parent f401460 commit 42f87e4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ Heroes = Backbone.Collection.extend({

VillainView = Backbone.Marionette.ItemView.extend({
template: "#villain-template",
tagName: "li"
tagName: "li",

events: {
'click': 'logInfoUrl'
},

logInfoUrl: function(){
console.log(this.model.get('info_url'));
}

});

HeroView = Backbone.Marionette.CompositeView.extend({
Expand Down

0 comments on commit 42f87e4

Please sign in to comment.