How do I pass the this context into an event handler?
The old/traditional way: Capture this in a variable: this.initialize = function(selector) { var that = this; $(‘span#banner1-nav’).click(function(event) { that._onClickNavigation(event); }); } You could also assign this to a variable e.g. instance: function ScrollBanner() { var instance = this; // … } and refer to instance instead of this in all the calls. The overall idea … Read more