Last active
June 27, 2018 15:11
-
-
Save Garconis/9bd5495608470e7d0956dae8120ea4fc to your computer and use it in GitHub Desktop.
jQuery | Pressing "Enter" in one input will cause another input to be clicked
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
<script> | |
jQuery(function() { | |
jQuery('.wpk-chmura form input[name="title"]').keypress(function(e) { | |
var key = e.which; | |
// the enter key code | |
if (key == 13) { | |
jQuery('.wpk-chmura form input[type="button"]').click(); | |
return false; | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment