Last active
February 23, 2017 17:17
-
-
Save ziishaned/45f382281715e611e739549fab01857e to your computer and use it in GitHub Desktop.
Submit the form by pressing command + enter button
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
(function() { | |
$('.textarea').on('keyup', function(e) { | |
if (e.which == 13 && ! e.shiftKey) { | |
// Write AJAX call here | |
// OR Just submit the form using the below code | |
$(this).closest('form').submit(); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment