Created
August 10, 2010 15:50
-
-
Save joeegan/517497 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| Utilities.enterPress = function(config) { | |
| $(config.trigger).keydown(function(ev){ | |
| // cross browser keyCode | |
| var code = (event.keyCode ? event.keyCode : event.which); | |
| if(code == 13) { | |
| // default enterPress may submit an aspnetForm | |
| ev.preventDefault(); | |
| config.func(); | |
| } | |
| }); | |
| } | |
| Utilities.enterPress({ | |
| trigger: '#login input#Password', | |
| func: function(){ | |
| $('#Login').html('Logging in <span class="bg1"/><span class="bg2"/>').addClass('loading').click(); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment