98
rated 0 times
[
103]
[
5]
/ answers: 1 / hits: 38465
/ 13 Years ago, mon, march 21, 2011, 12:00:00
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);
}
});
More From » events