Skip to content

Instantly share code, notes, and snippets.

@nuxodin
Last active October 13, 2015 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuxodin/4269504 to your computer and use it in GitHub Desktop.
Save nuxodin/4269504 to your computer and use it in GitHub Desktop.
Why is there no "originalScrop" property of the event Object? This would be very useful
{
show: function(){
$(document).on('keydown',this.keydownListener);
},
keydownListener: function(e){
if(e.which===27){ e.originalScope.hide(); } /// <----- originalScope
},
hide: function(){
$(document).off('keydown',this.keydownListener);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment