Reputation: 8503
I have a textfield which fires an event in a web app, but I'd like the keyboard to close when the user presses enter. Using jquery to disable usual submission.
Upvotes: 14
Views: 13737
Reputation: 486
Create blur event
To open:
$('input#search').focus();
To close:
$('input#search').blur();
Upvotes: 47