make 'this' work in event handlers

This commit is contained in:
rolux 2011-11-30 14:48:01 +01:00
parent dfd2787438
commit 3597b8c60c

View file

@ -109,7 +109,7 @@ Ox.Element = function(options, self) {
function bind(action, event, callback) {
self.$eventHandler[action]('ox_' + event, function(event, data) {
callback(Ox.extend({
callback.call(that, Ox.extend({
_element: that.$element,
_event: event
}, data));