I have a Backbone View that uses iScroll to implement a slideshow.
iScroll publishes an onScrollEnd
event, but I cannot seem to bind/subscribe to it inside the View:
App.Views.Scroller = Backbone.View.extend({
events: {
'onScrollEnd' : 'scrollEnd'
},
initialize: function(){
var self = this;
this.scroller = new iScroll('content-scroller', {
onScrollEnd: function() {
self.trigger('onScrollEnd');
}
});
},
scrollEnd: function(e){
// never called :(
console.log(e);
}
});