I\'m trying to capture the scroll event within a Backbone.Marionette.CompositeView, but without success.
As an exercise, I\'m rewriting http://www.atinux.fr/backbone
This code works for me:
var View = Backbone.View.extend({
events: { "scroll": "scroll" },
scroll: function(){ console.log( "scrolling..." ); }
});
Check the jsFiddle
As @JoshLeitzel said I think the issue is in the DOM element it self.
Try to by-pass Backbone doing:
$("#content").bind( "scroll", function(){ console.log( "scrolling from jquery directly" ); } );
Also try to replace:
el: $('#content')
by
el: '#content'
I don't think this is the issue but is the new style of el
definition :)