1. Passing 'this' in jQuery event handlers

    Found this technique to pass this to an event handler on Stack Overflow. First define the handler:

    $('#the-element').on('click', {self:this}, this.onClick);

    Then inside the handler access this using the event data:

    var self = event.data.self;