Created
August 28, 2014 21:12
-
-
Save benekastah/537ee80f54aaf966c8a2 to your computer and use it in GitHub Desktop.
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
var $el = $('.some-element'); | |
var clickHandler = function () { | |
// do things | |
}; | |
$el.click(clickHandler); | |
// This works, but it isn't the best way | |
keyBindings({ | |
'F5': function () { $el.click(); } | |
}); | |
// This is better | |
keyBindings({ | |
'F5': clickHandler | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment