Skip to content

Instantly share code, notes, and snippets.

@Garconis
Last active June 27, 2018 15:11
Show Gist options
  • Save Garconis/9bd5495608470e7d0956dae8120ea4fc to your computer and use it in GitHub Desktop.
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
<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