Submit forms when CTRL+Enter is pressed in a textarea using jQuery

This is how we add that functionality to our websites using jQuery:

$('textarea').keypress(function(e){
    if (e.ctrlKey && e.keyCode == 13) {
        $(this).closest('form').submit();
    }
});

[ad code=4]

Join the Conversation

1 Comment

Leave a comment