Last active
October 13, 2015 22:59
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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