Backbone events within collections

Quick but handy to know… when within a collections (and possibly views haven’t tried that yet) when you’re running a custom function as below on a click (checkit).. then you can get the attributes from the dom element by using $(event.target). Handy!

events: {
    "click .hello": "checkit"
  },
checkit: function(){
  var prop =  $(event.target).attr('data-1');
  console.log(prop);
  },