Its best to add `this`, so it should be `this.$(currentTarget).attr("data-type");`. That way jQuery is bound to the views context.